/** * Gets the URL arguments to append to a list redirect. * * @return string The arguments to append to the redirect URL. * * @since 12.2 */ protected function getRedirectToListAppend() { $append = parent::getRedirectToListAppend(); $component = $this->input->get('component', 0, 'int'); if ($component) { $append .= "&id=" . $component; } $table = $this->input->get('table', 0, 'int'); if ($table) { $append .= "&active=tables." . $table; } return $append; }
/** * Gets the URL arguments to append to a list redirect. * * @return string The arguments to append to the redirect URL. * * @since 12.2 */ protected function getRedirectToListAppend() { $append = parent::getRedirectToListAppend(); $data = $this->input->get("jform", array(), "array"); // Item has relation to table if (is_array($data) && isset($data["relation"]) && !empty($data["relation"])) { $parts = explode(".", $data["relation"]); if (is_array($parts) && count($parts) >= 2 && $parts[0] == "table") { $component = $this->getModel("Component")->getItem($this->getModel("Table")->getItem($parts[1])->component); $this->setRedirect(JRoute::_("index.php?option=com_jdeveloper&view=component&id=" . $component->id . "&active=forms", false)); $this->redirect(); } } $parent_id = $this->input->get('parent_id', 0, 'int'); if ($parent_id) { $append .= "&parent_id=" . $parent_id; } return $append; }