Pimcore\Model\Object\Classificationstore\CollectionConfig::getById PHP Method

getById() public static method

public static getById ( integer $id ) : CollectionConfig
$id integer
return CollectionConfig
    public static function getById($id)
    {
        try {
            $config = new self();
            $config->setId(intval($id));
            $config->getDao()->getById();
            return $config;
        } catch (\Exception $e) {
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Loads a list of Classificationstore collection configs for the specified parameters, returns an array of config elements
  *
  * @return array
  */
 public function load()
 {
     $sql = "SELECT id FROM " . Object\Classificationstore\CollectionConfig\Dao::TABLE_NAME_COLLECTIONS . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit();
     $configsData = $this->db->fetchCol($sql, $this->model->getConditionVariables());
     $configData = [];
     foreach ($configsData as $config) {
         $configData[] = Object\Classificationstore\CollectionConfig::getById($config);
     }
     $this->model->setList($configData);
     return $configData;
 }
All Usage Examples Of Pimcore\Model\Object\Classificationstore\CollectionConfig::getById