類別AdminAddLinkCategoryAction的繼承圖:

公開方法(Public Methods) | |
| AdminAddLinkCategoryAction ($actionInfo, $request) | |
| perform () | |
公開屬性 | |
| $_linkCategoryName | |
| $_properties | |
定義在 adminaddlinkcategoryaction.class.php 檔案之第 15 行.
|
||||||||||||
|
Constructor. If nothing else, it also has to call the constructor of the parent class, BlogAction with the same parameters 定義在 adminaddlinkcategoryaction.class.php 檔案之第 25 行. 參考 $request, AdminAction::AdminAction(), Action::registerFieldValidator(), 及 Action::setValidationErrorView(). 00026 { 00027 $this->AdminAction( $actionInfo, $request ); 00028 00029 // data validation 00030 $this->registerFieldValidator( "linkCategoryName", new StringValidator()); 00031 $this->setValidationErrorView( new AdminTemplatedView( $this->_blogInfo, "newlinkcategory" )); 00032 }
|
|
|
Carries out the specified action 依據Action重新實作. 定義在 adminaddlinkcategoryaction.class.php 檔案之第 38 行. 參考 false, CacheControl::resetBlogCache(), 及 AdminAction::setCommonData(). 00039 { 00040 // add the new link category to the database 00041 $this->_linkCategoryName = Textfilter::filterAllHTML($this->_request->getValue( "linkCategoryName" )); 00042 $mylinksCategories = new MyLinksCategories(); 00043 $mylinksCategory = new MyLinksCategory( $this->_linkCategoryName, 00044 $this->_blogInfo->getId(), 00045 0, 00046 $this->_properties ); 00047 // the view is the same for both conditions 00048 $this->_view = new AdminLinkCategoriesListView( $this->_blogInfo ); 00049 00050 if( !$mylinksCategories->addMyLinksCategory( $mylinksCategory, $this->_blogInfo->getId())) { 00051 // set an error message 00052 $this->_view->setErrorMessage( $this->_locale->tr("error_adding_link_category")); 00053 } 00054 else { 00055 // clear the cache 00056 CacheControl::resetBlogCache( $this->_blogInfo->getId(), false ); 00057 $this->_view->setSuccessMessage( $this->_locale->pr("link_category_added_ok", $mylinksCategory->getName())); 00058 } 00059 00060 $this->setCommonData(); 00061 00062 return true; 00063 }
|
|
|
定義在 adminaddlinkcategoryaction.class.php 檔案之第 18 行. |
|
|
定義在 adminaddlinkcategoryaction.class.php 檔案之第 19 行. |