Redaxscript\Detector\Template::_autorun PHP Method

_autorun() protected method

automate run
Since: 2.1.0
protected _autorun ( )
    protected function _autorun()
    {
        $dbStatus = $this->_registry->get('dbStatus');
        $lastTable = $this->_registry->get('lastTable');
        $lastId = $this->_registry->get('lastId');
        $fileInstall = $this->_registry->get('file') === 'install.php';
        $partial = $fileInstall ? 'install.phtml' : 'index.phtml';
        /* detect template */
        $this->_detect(['query' => $this->_request->getQuery('t'), 'session' => $this->_request->getSession('template'), 'contents' => $lastTable ? Db::forTablePrefix($lastTable)->where('id', $lastId)->findOne()->template : null, 'settings' => $dbStatus === 2 ? Db::getSetting('template') : null, 'install' => $fileInstall ? 'install' : null, 'fallback' => 'default'], 'template', 'templates/' . $this->_filePlaceholder . '/' . $partial);
    }
Template