/** * Renders an insert tag. * * @param string $insertTag * * @return Response */ public function renderAction($insertTag) { $this->framework->initialize(); /** @var InsertTags $it */ $it = $this->framework->createInstance('Contao\\InsertTags'); // Never cache these responses return (new Response($it->replace($insertTag, false)))->setPrivate(); }
/** * Runs the command scheduler. */ public function onKernelTerminate() { if (!$this->framework->isInitialized() || !$this->canRunController()) { return; } /** @var FrontendCron $controller */ $controller = $this->framework->createInstance('Contao\\FrontendCron'); $controller->run(); }
/** * Runs the command scheduler. */ public function onKernelTerminate() { if (!$this->framework->isInitialized()) { return; } /** @var Config $config */ $config = $this->framework->getAdapter('Contao\\Config'); if ($config->get('disableCron')) { return; } /** @var FrontendCron $controller */ $controller = $this->framework->createInstance('Contao\\FrontendCron'); $controller->run(); }