OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
adminguestbook_list.php
Go to the documentation of this file.
1 <?php
2 
11 {
12 
18  protected $_sThisTemplate = 'adminguestbook_list.tpl';
19 
25  protected $_sListClass = 'oxgbentry';
26 
32  protected $_sDefSortField = 'oxcreate';
33 
39  protected $_blDesc = true;
40 
47  public function render()
48  {
50 
51  $oList = $this->getItemList();
52  if ($oList && $oList->count()) {
53 
54  $oDb = oxDb::getDb();
55  foreach ($oList as $oEntry) {
56  // preloading user info ..
57  $sUserIdField = 'oxgbentries__oxuserid';
58  $sUserLastNameField = 'oxuser__oxlname';
59  if (isset($oEntry->$sUserIdField) && $oEntry->$sUserIdField->value) {
60  $sSql = "select oxlname from oxuser where oxid=" . $oDb->quote($oEntry->$sUserIdField->value);
61  $oEntry->$sUserLastNameField = new oxField($oDb->getOne($sSql, false, false));
62  }
63  }
64  }
65 
66  $this->_aViewData["mylist"] = $oList;
67 
68  return $this->_sThisTemplate;
69  }
70 
71 }