OXID eShop CE  4.9.9
 All Classes Files Functions Variables Pages
adminguestbook_list.php
Go to the documentation of this file.
1 <?php
2 
9 {
10 
16  protected $_sThisTemplate = 'adminguestbook_list.tpl';
17 
23  protected $_sListClass = 'oxgbentry';
24 
30  protected $_sDefSortField = 'oxcreate';
31 
37  protected $_blDesc = true;
38 
45  public function render()
46  {
48 
49  $oList = $this->getItemList();
50  if ($oList && $oList->count()) {
51 
52  $oDb = oxDb::getDb();
53  foreach ($oList as $oEntry) {
54  // preloading user info ..
55  $sUserIdField = 'oxgbentries__oxuserid';
56  $sUserLastNameField = 'oxuser__oxlname';
57  if (isset($oEntry->$sUserIdField) && $oEntry->$sUserIdField->value) {
58  $sSql = "select oxlname from oxuser where oxid=" . $oDb->quote($oEntry->$sUserIdField->value);
59  $oEntry->$sUserLastNameField = new oxField($oDb->getOne($sSql, false, false));
60  }
61  }
62  }
63 
64  $this->_aViewData["mylist"] = $oList;
65 
66  return $this->_sThisTemplate;
67  }
68 
69 }