adminguestbook_list.php

Go to the documentation of this file.
00001 <?php
00002 
00008 class AdminGuestbook_List extends oxAdminList
00009 {
00014     protected $_sThisTemplate = 'adminguestbook_list.tpl';
00015 
00021     protected $_sListClass = 'oxgbentry';
00022 
00028     protected $_sDefSort = 'oxgbentries.oxcreate';
00029 
00035     protected $_blDesc = true;
00036 
00043     public function render()
00044     {
00045         parent::render();
00046 
00047         $oList = $this->getItemList();
00048         if ( $oList && $oList->count() ) {
00049 
00050             $oDb = oxDb::getDb();
00051             foreach ( $oList as $oEntry ) {
00052                 // preloading user info ..
00053                 if ( isset( $oEntry->oxgbentries__oxuserid ) && $oEntry->oxgbentries__oxuserid->value ) {
00054                     $oEntry->oxuser__oxlname = new oxField( $oDb->getOne( "select oxlname from oxuser where oxid=".$oDb->quote( $oEntry->oxgbentries__oxuserid->value ) ));
00055                 }
00056             }
00057         }
00058 
00059         $this->_aViewData["mylist"] = $oList;
00060         return $this->_sThisTemplate;
00061     }
00062 
00063 }