/** * Method to add a new record. * * @return mixed True if the record can be added, a error object if not. * * @since 12.2 */ public function add() { $item_id = $this->input->get('item_id', 0, 'int'); $type = $this->input->get('type', '', 'string'); $name = $this->input->get('name', '', 'string'); if ($this->allowAdd() && !empty($type) && !empty($name) && !empty($item_id)) { $override = $this->getModel()->getOverride($type, $item_id, $name); if (!empty($override)) { $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($override->id, 'id'), false)); return true; } } parent::add(); }