| [ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" ); 4 lt_include( PLOG_CLASS_PATH."class/dao/customfields/customfields.class.php" ); 5 lt_include( PLOG_CLASS_PATH."class/data/pager/pager.class.php" ); 6 7 /** 8 * \ingroup View 9 * @private 10 * 11 * displays the list of custom fields that have been added 12 * to the blog, or an empty list of none has been added! 13 */ 14 class AdminCustomFieldsListView extends AdminTemplatedView 15 { 16 var $_page; 17 18 function AdminCustomFieldsListView( $blogInfo ) 19 { 20 $this->AdminTemplatedView( $blogInfo, "customfields" ); 21 22 // get the current page from the request 23 $this->_page = $this->getCurrentPageFromRequest(); 24 } 25 26 /** 27 * load the fields and pass them to the view 28 */ 29 function render() 30 { 31 // load the custom fields that have been defined so far 32 $customFields = new CustomFields(); 33 $blogFields = $customFields->getBlogCustomFields( $this->_blogInfo->getId(), true, $this->_page, DEFAULT_ITEMS_PER_PAGE ); 34 $this->notifyEvent( EVENT_CUSTOM_FIELDS_LOADED, Array( "fields" => &$blogFields )); 35 // and the total number of them too 36 $numBlogFields = $customFields->getNumBlogCustomFields( $this->_blogInfo->getId()); 37 38 // create the pager 39 $pager = new Pager( "?op=blogCustomFields&page=", 40 $this->_page, 41 $numBlogFields, 42 DEFAULT_ITEMS_PER_PAGE ); 43 44 // and show them 45 $this->setValue( "fields", $blogFields ); 46 $this->setValue( "pager", $pager ); 47 48 return parent::render(); 49 } 50 } 51 ?>
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 |
|