function getAllObjects()
 {
     $facetsList = array();
     $locationId = $_REQUEST['locationId'];
     $library = new LocationFacetSetting();
     $library->locationId = $locationId;
     $library->orderBy('weight');
     $library->find();
     while ($library->fetch()) {
         $facetsList[$library->id] = clone $library;
     }
     return $facetsList;
 }
Exemple #2
0
 public function __get($name)
 {
     if ($name == "hours") {
         if (!isset($this->hours)) {
             $this->hours = array();
             if ($this->locationId) {
                 $hours = new LocationHours();
                 $hours->locationId = $this->locationId;
                 $hours->orderBy('day');
                 $hours->find();
                 while ($hours->fetch()) {
                     $this->hours[$hours->id] = clone $hours;
                 }
             }
         }
         return $this->hours;
     } elseif ($name == "facets") {
         if (!isset($this->facets)) {
             $this->facets = array();
             if ($this->locationId) {
                 $facet = new LocationFacetSetting();
                 $facet->locationId = $this->locationId;
                 $facet->orderBy('weight');
                 $facet->find();
                 while ($facet->fetch()) {
                     $this->facets[$facet->id] = clone $facet;
                 }
             }
         }
         return $this->facets;
     } else {
         return $this->data[$name];
     }
 }
Exemple #3
0
 public function __get($name)
 {
     if ($name == "hours") {
         if (!isset($this->hours)) {
             $this->hours = array();
             if ($this->locationId) {
                 $hours = new LocationHours();
                 $hours->locationId = $this->locationId;
                 $hours->orderBy('day');
                 $hours->find();
                 while ($hours->fetch()) {
                     $this->hours[$hours->id] = clone $hours;
                 }
             }
         }
         return $this->hours;
     } elseif ($name == "moreDetailsOptions") {
         if (!isset($this->moreDetailsOptions) && $this->libraryId) {
             $this->moreDetailsOptions = array();
             $moreDetailsOptions = new LocationMoreDetails();
             $moreDetailsOptions->locationId = $this->locationId;
             $moreDetailsOptions->orderBy('weight');
             $moreDetailsOptions->find();
             while ($moreDetailsOptions->fetch()) {
                 $this->moreDetailsOptions[$moreDetailsOptions->id] = clone $moreDetailsOptions;
             }
         }
         return $this->moreDetailsOptions;
     } elseif ($name == "facets") {
         if (!isset($this->facets)) {
             $this->facets = array();
             if ($this->locationId) {
                 $facet = new LocationFacetSetting();
                 $facet->locationId = $this->locationId;
                 $facet->orderBy('weight');
                 $facet->find();
                 while ($facet->fetch()) {
                     $this->facets[$facet->id] = clone $facet;
                 }
             }
         }
         return $this->facets;
     } elseif ($name == 'browseCategories') {
         if (!isset($this->browseCategories) && $this->locationId) {
             $this->browseCategories = array();
             $browseCategory = new LocationBrowseCategory();
             $browseCategory->locationId = $this->locationId;
             $browseCategory->orderBy('weight');
             $browseCategory->find();
             while ($browseCategory->fetch()) {
                 $this->browseCategories[$browseCategory->id] = clone $browseCategory;
             }
         }
         return $this->browseCategories;
     } else {
         return $this->data[$name];
     }
 }