Esempio n. 1
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->filter = $this->get('Filter');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     parent::displayWithPanel($tpl);
 }
Esempio n. 2
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->filter = $this->get('Filter');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     foreach ($this->items as &$item) {
         $item->thumbObject = $thumb = new WebgalleryThumb($item->a_id);
         $path = JPATH_ROOT . '/' . $thumb->getPath();
         $files = array();
         if (JFolder::exists($path)) {
             $files = JFolder::files($path);
         }
         $item->thumbs = $files;
     }
     parent::displayWithPanel($tpl);
 }