1 block.news.inc | public static DashboardNewsBlock::getNews() |
Return the current list of news items.
This response is cached. If there is no recent cache, a new one will be generated on-the-fly. If the first request fails, the cache will persist with FALSE as the saved value until the next time the cache is cleared or cron updates the news list.
Return value
FALSE|array:
File
- core/
modules/ dashboard/ includes/ block.news.inc, line 112 - Dashboard block displaying BackdropCMS.org news items.
Class
Code
public static function getNews() {
$cache = cache()->get('dashboard_news_feed');
// If no cache is set at all, fetch results immediately.
if ($cache === FALSE) {
$news = DashboardNewsBlock::refreshNewsFeed();
}
else {
$news = $cache->data;
}
return $news;
}