Contao\DataContainer::switchToEdit PHP Method

switchToEdit() protected method

Return a query string that switches into edit mode
protected switchToEdit ( integer $id ) : string
$id integer
return string
    protected function switchToEdit($id)
    {
        $arrKeys = array();
        $arrUnset = array('act', 'id', 'table');
        foreach (array_keys($_GET) as $strKey) {
            if (!in_array($strKey, $arrUnset)) {
                $arrKeys[$strKey] = $strKey . '=' . \Input::get($strKey);
            }
        }
        $strUrl = TL_SCRIPT . '?' . implode('&', $arrKeys);
        return $strUrl . (!empty($arrKeys) ? '&' : '') . (\Input::get('table') ? 'table=' . \Input::get('table') . '&' : '') . 'act=edit&id=' . $id;
    }