protected function setPage ()
        {
            $urlTemplates = [];

            if ($this->arParams['SEF_MODE'] === 'Y')
            {
                $variables = [];

                $urlTemplates = \CComponentEngine::MakeComponentUrlTemplates (
                    $this->defaultUrlTemplates404,
                    $this->arParams['SEF_URL_TEMPLATES']
                );

                $variableAliases = \CComponentEngine::MakeComponentVariableAliases (
                    $this->defaultUrlTemplates404,
                    $this->arParams['VARIABLE_ALIASES']
                );

                $this->templatePage = \CComponentEngine::ParseComponentPath (
                    $this->arParams['SEF_FOLDER'],
                    $urlTemplates,
                    $variables
                );

                if (!$this->templatePage)
                {
                    if ($this->arParams['SET_404'] === 'Y')
                    {
                        $folder404 = str_replace ('\\', '/', $this->arParams['SEF_FOLDER']);

                        if ($folder404 != '/')
                        {
                            $folder404 = '/' . trim ($folder404, "/ \t\n\r\0\x0B") . "/";
                        }

                        if (substr ($folder404, - 1) == '/')
                        {
                            $folder404 .= 'index.php';
                        }

                        if ($folder404 != Main\Context::getCurrent ()->getRequest ()->getRequestedPage ())
                        {
                            $this->return404 ();
                        }
                    }

                    $this->templatePage = $this->defaultSefPage;
                }

                if ($this->isSearchRequest () && $this->arParams['USE_SEARCH'] === 'Y')
                {
                    $this->templatePage = 'search';
                }

                \CComponentEngine::InitComponentVariables (
                    $this->templatePage,
                    $this->componentVariables,
                    $variableAliases,
                    $variables
                );

                $models = $this->setModels ();
            } else
            {
                $this->templatePage = $this->defaultPage;
            }

            $this->sefFolder = $this->arParams['SEF_FOLDER'];
            $this->urlTemplates = $urlTemplates;
            $this->variables = $variables;
            $this->variableAliases = $variableAliases;
            $this->models = $models;
        }