OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
adminguestbook_list.php
Go to the documentation of this file.
1 <?php
2 
9 {
14  protected $_sThisTemplate = 'adminguestbook_list.tpl';
15 
21  protected $_sListClass = 'oxgbentry';
22 
28  protected $_sDefSortField = 'oxcreate';
29 
35  protected $_blDesc = true;
36 
43  public function render()
44  {
46 
47  $oList = $this->getItemList();
48  if ( $oList && $oList->count() ) {
49 
50  $oDb = oxDb::getDb();
51  foreach ( $oList as $oEntry ) {
52  // preloading user info ..
53  if ( isset( $oEntry->oxgbentries__oxuserid ) && $oEntry->oxgbentries__oxuserid->value ) {
54  $oEntry->oxuser__oxlname = new oxField( $oDb->getOne( "select oxlname from oxuser where oxid=".$oDb->quote( $oEntry->oxgbentries__oxuserid->value ), false, false ));
55  }
56  }
57  }
58 
59  $this->_aViewData["mylist"] = $oList;
60  return $this->_sThisTemplate;
61  }
62 
63 }