tl_page::makeRedirectPageMandatory PHP Method

makeRedirectPageMandatory() public method

Make the redirect page mandatory if the page is a logout page
public makeRedirectPageMandatory ( DataContainer $dc ) : mixed
$dc DataContainer
return mixed
    public function makeRedirectPageMandatory(DataContainer $dc)
    {
        $objPage = $this->Database->prepare("SELECT * FROM " . $dc->table . " WHERE id=?")->limit(1)->execute($dc->id);
        if ($objPage->numRows && $objPage->type == 'logout') {
            $GLOBALS['TL_DCA']['tl_page']['fields']['jumpTo']['eval']['mandatory'] = true;
        }
    }