NewsNewsFeaturesDownloadsDevelopmentSupportForumDocumentsAbout Us

AdminAddLinkCategoryAction 類別 參考文件
[Action]

類別AdminAddLinkCategoryAction的繼承圖:

AdminAction Action Object 全部成員列表

公開方法(Public Methods)

 AdminAddLinkCategoryAction ($actionInfo, $request)
 perform ()

公開屬性

 $_linkCategoryName
 $_properties

詳細描述

Action that takes care of adding a new link category

定義在 adminaddlinkcategoryaction.class.php 檔案之第 15 行.


建構子與解構子說明文件

AdminAddLinkCategoryAction::AdminAddLinkCategoryAction actionInfo,
request
 

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         }


函式成員說明文件

AdminAddLinkCategoryAction::perform  ) 
 

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::$_linkCategoryName
 

定義在 adminaddlinkcategoryaction.class.php 檔案之第 18 行.

AdminAddLinkCategoryAction::$_properties
 

定義在 adminaddlinkcategoryaction.class.php 檔案之第 19 行.


此類別(class) 文件是由下列檔案中產生: