/**
  * getter na fotogalerie
  * @reutrn PhotogalleriesRecords
  */
 public function getPhotogalleries()
 {
     try {
         if ($this->photogalleries instanceof PhotogalleriesRecords) {
             return $this->photogalleries;
         }
         $this->photogalleries = new PhotogalleriesRecords(array("ref_category" => $this->get($this->getClassVar("idColName"))));
         $this->photogalleries->setOutputFilterItemsClass("OutputFilterPhotoGallery");
         return $this->photogalleries;
     } catch (Exception $e) {
         throw $e;
     }
 }
Esempio n. 2
0
 /**
  * getter na relevantni fotogalerii pokud nejaka je
  * @return PhotogalleriesRecord
  */
 public function getPhotogallery()
 {
     try {
         if ($this->photogalleryReferenced instanceof PhotogalleriesRecord) {
             return $this->photogalleryReferenced;
         }
         if (is_numeric($this->params["ref_photogallery"])) {
             $this->photogalleryReferenced = new PhotogalleriesRecord($this->get("ref_photogallery"));
             $records = new PhotogalleriesRecords(array("id" => $this->get("ref_photogallery")));
             if ($records->count() < 1) {
                 throw new LBoxException("Bounded photogallery !not found!");
             }
             $this->photogalleryReferenced = $records->current();
             $this->photogalleryReferenced->setOutputFilter(new OutputFilterPhotoGallery($this->photogalleryReferenced));
             return $this->photogalleryReferenced;
         }
     } catch (Exception $e) {
         throw $e;
     }
 }