[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" ); 4 lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" ); 5 lt_include( PLOG_CLASS_PATH."class/view/admin/adminlinkslistview.class.php" ); 6 7 /** 8 * \ingroup Action 9 * @private 10 * 11 * Action that shows the list of user defined links (blogroll) 12 */ 13 class AdminEditLinksAction extends AdminAction 14 { 15 16 var $_categoryId; 17 18 /** 19 * Constructor. If nothing else, it also has to call the constructor of the parent 20 * class, BlogAction with the same parameters 21 */ 22 function AdminEditLinksAction( $actionInfo, $request ) 23 { 24 $this->AdminAction( $actionInfo, $request ); 25 26 // data validation. In this case if the element is not correct we won't 27 // bother doing anything... we'll just show the whole list of categories 28 $this->registerFieldValidator( "showCategory", new IntegerValidator(), true); 29 $blogSettings = $this->_blogInfo->getSettings(); 30 $this->_linkCategoriesOrder = $blogSettings->getValue( "link_categories_order", MYLINKS_CATEGORIES_NO_ORDER ); 31 $this->setValidationErrorView( new AdminLinksListView( $this->_blogInfo, 32 Array( "showCategory" => 0, 33 "searchTerms" => "", 34 "showOrder" => $this->_linkCategoriesOrder ))); 35 36 37 $this->requirePermission( "view_links" ); 38 } 39 40 /** 41 * Carries out the specified action 42 */ 43 function perform() 44 { 45 // get the id of the category we'd like to load 46 $this->_categoryId = $this->_request->getValue( "showCategory" ); 47 $this->_searchTerms = $this->_request->getValue( "searchTerms" ); 48 49 // and create the view with all the parameters we'll need 50 $this->_view = new AdminLinksListView( $this->_blogInfo, Array( "showCategory" => $this->_categoryId, 51 "searchTerms" => $this->_searchTerms, 52 "showOrder" => $this->_linkCategoriesOrder )); 53 $this->setCommonData(); 54 55 // better to return true if everything fine 56 return true; 57 } 58 } 59 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |