Bolt\Controller\Async\General::dashboardNews PHP Method

dashboardNews() public method

News. Film at 11.
public dashboardNews ( Request $request ) : TemplateResponse
$request Symfony\Component\HttpFoundation\Request
return Bolt\Response\TemplateResponse
    public function dashboardNews(Request $request)
    {
        $news = $this->getNews($request->getHost());
        // One 'alert' and one 'info' max. Regular info-items can be disabled,
        // but Alerts can't.
        $context = ['alert' => empty($news['alert']) ? null : $news['alert'], 'information' => empty($news['information']) ? null : $news['information'], 'error' => empty($news['error']) ? null : $news['error'], 'disable' => $this->getOption('general/backend/news/disable')];
        $response = $this->render('@bolt/components/panel-news.twig', ['context' => $context]);
        $response->setSharedMaxAge(3600)->setPublic();
        return $response;
    }