state = $this->get('State'); $this->item = $this->get('Item'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } return parent::display($tpl); } }