Pimcore\Model\Site::getById PHP Method

getById() public static method

public static getById ( integer $id ) : Site
$id integer
return Site
    public static function getById($id)
    {
        $site = new self();
        $site->getDao()->getById(intval($id));
        return $site;
    }

Usage Example

Esempio n. 1
0
 /**
  * Loads a list of thumanils for the specicifies parameters, returns an array of Thumbnail elements
  *
  * @return array
  */
 public function load()
 {
     $sites = [];
     $sitesData = $this->db->fetchCol("SELECT id FROM sites" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());
     foreach ($sitesData as $siteData) {
         $sites[] = Model\Site::getById($siteData);
     }
     $this->model->setSites($sites);
     return $sites;
 }
All Usage Examples Of Pimcore\Model\Site::getById