/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$append = '';
// Setup redirect info.
if ($tmpl = $this->input->get('tmpl', '', 'string')) {
$append .= '&tmpl=' . $tmpl;
}
if ($layout = $this->input->get('layout', 'edit', 'string')) {
$append .= '&layout=' . $layout;
}
if ($forcedLanguage = $this->input->get('forcedLanguage', '', 'cmd')) {
$append .= '&forcedLanguage=' . $forcedLanguage;
}
if ($recordId) {
$append .= '&' . $urlVar . '=' . $recordId;
}
$return = $this->input->get('return', null, 'base64');
if ($return) {
$append .= '&return=' . $return;
}
return $append;
}