Exemplo n.º 1
0
 protected function loadFromDatabase()
 {
     if (!isset($this->fields)) {
         $this->fields = \CCatalogProduct::getByID($this->id);
         if (is_array($this->fields)) {
             if ($this->fields["MEASURE"] > 0) {
                 $this->fields["MEASURE"] = new ElementCatalogMeasure($this->fields["MEASURE"]);
             }
             $this->fields["STORE"] = new ElementCatalogStoreList(0);
         } else {
             $this->fields["STORE"] = new ElementCatalogStoreList(0);
         }
     }
     return is_array($this->fields);
 }