Contao\Versions::getEditUrl PHP Метод

getEditUrl() защищенный Метод

Return the edit URL
protected getEditUrl ( ) : string
Результат string
    protected function getEditUrl()
    {
        if ($this->strEditUrl !== null) {
            return sprintf($this->strEditUrl, $this->intPid);
        }
        $strUrl = \Environment::get('request');
        // Save the real edit URL if the visibility is toggled via Ajax
        if (preg_match('/&(amp;)?state=/', $strUrl)) {
            $strUrl = preg_replace(array('/&(amp;)?id=[^&]+/', '/(&(amp;)?)t(id=[^&]+)/', '/(&(amp;)?)state=[^&]*/'), array('', '$1$3', '$1act=edit'), $strUrl);
        }
        // Adjust the URL of the "personal data" module (see #7987)
        if (preg_match('/do=login(&|$)/', $strUrl)) {
            $strUrl = preg_replace('/do=login(&|$)/', 'do=user$1', $strUrl);
            $strUrl .= '&act=edit&id=' . $this->User->id . '&rt=' . REQUEST_TOKEN;
        }
        // Correct the URL in "edit|override multiple" mode (see #7745)
        $strUrl = preg_replace('/act=(edit|override)All/', 'act=edit&id=' . $this->intPid, $strUrl);
        return $strUrl;
    }