public function createQuery() { $query = DiaporamaImageQuery::create(); !is_null($this->diaporama_id) and $query->filterByDiaporamaId($this->diaporama_id); return $query; }
/** * Retrieving diaporama's images * @return array Diaporama's images. */ public function getImages() { return DiaporamaImageQuery::create()->findByDiaporamaId($this->getId()); }