コード例 #1
0
ファイル: imagetypeset.php プロジェクト: sansandeep143/av
 /**
  * Return all imagetypesets
  *
  * @param $publishedOnly
  * @return array
  */
 public function getImageTypeSets($publishedOnly)
 {
     if ($this->_imagetypesets == null) {
         $db = JFactory::getDBO();
         $query = $db->getQuery(true);
         $query->select('id');
         $query->from('#__eventgallery_imagetypeset');
         $query->order($db->quoteName('default') . ' DESC');
         $query->order('ordering');
         $db->setQuery($query);
         $items = $db->loadObjectList();
         $this->_imagetypesets = array();
         $this->_imagetypesets_published = array();
         foreach ($items as $item) {
             /**
              * @var EventgalleryLibraryImagetypeset $itemObject
              */
             $itemObject = new EventgalleryLibraryImagetypeset($item->id);
             if ($itemObject->isPublished()) {
                 $this->_imagetypesets_published[$itemObject->getId()] = $itemObject;
             }
             $this->_imagetypesets[$itemObject->getId()] = $itemObject;
         }
     }
     if ($publishedOnly) {
         return $this->_imagetypesets_published;
     } else {
         return $this->_imagetypesets;
     }
 }
コード例 #2
0
ファイル: folder.php プロジェクト: sansandeep143/av
 /**
  * Load necessary data for this folder object.
  */
 protected function _prepareData()
 {
     if ($this->_folder == null) {
         return;
     }
     $this->_ls_description = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->description);
     $this->_ls_text = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->text);
     /**
      * @var EventgalleryLibraryManagerImagetypeset $imagetypesetMgr
      */
     $imagetypesetMgr = EventgalleryLibraryManagerImagetypeset::getInstance();
     if ($this->_folder->imagetypesetid == null) {
         $this->_imagetypeset = $imagetypesetMgr->getDefaultImageTypeSet(true);
     } else {
         $this->_imagetypeset = $imagetypesetMgr->getImageTypeSet($this->_folder->imagetypesetid);
         if (!$this->_imagetypeset->isPublished()) {
             $this->_imagetypeset = $imagetypesetMgr->getDefaultImageTypeSet(true);
         }
     }
 }