Example #1
0
 /**
  * Loads values from database.
  * Returns true on success.
  *
  * @return boolean
  */
 protected function loadFromDatabase()
 {
     if (!isset($this->fields) && $this->id > 0) {
         $storeList = \CCatalogStore::getList(array(), array("ID" => $this->id), false, false, array("ID", "TITLE"));
         $this->fields = $storeList->fetch();
     }
     return is_array($this->fields);
 }
Example #2
0
 protected function load()
 {
     $storeList = \CCatalogStore::getList(array(), array("ACTIVE" => "Y"), false, false, array("ID", "TITLE", "ACTIVE"));
     $result = array();
     while ($ar = $storeList->fetch()) {
         $result[] = $ar["TITLE"];
     }
     return $result;
 }