Exemplo n.º 1
0
 /**
  * Display function
  */
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->item = $this->get('Item');
     $this->form = $this->get('Form');
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Display the template
     parent::display($tpl);
     // Set the documents
     $this->setDocument();
 }
Exemplo n.º 2
0
 /**
  * Display function
  */
 public function display($tpl = null)
 {
     // Get data from the model
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Display the template
     parent::display($tpl);
     // Set the documents
     $this->setDocument();
 }