public function AggregatorController::pageLast in Drupal 9
Same name and namespace in other branches
- 8 core/modules/aggregator/src/Controller/AggregatorController.php \Drupal\aggregator\Controller\AggregatorController::pageLast()
Displays the most recent items gathered from any feed.
Return value
string The rendered list of items for the feed.
1 string reference to 'AggregatorController::pageLast'
- aggregator.routing.yml in core/
modules/ aggregator/ aggregator.routing.yml - core/modules/aggregator/aggregator.routing.yml
File
- core/
modules/ aggregator/ src/ Controller/ AggregatorController.php, line 175
Class
- AggregatorController
- Returns responses for aggregator module routes.
Namespace
Drupal\aggregator\ControllerCode
public function pageLast() {
$items = $this
->entityTypeManager()
->getStorage('aggregator_item')
->loadAll(20);
$build = $this
->buildPageList($items);
$build['#attached']['feed'][] = [
'aggregator/rss',
$this
->config('system.site')
->get('name') . ' ' . $this
->t('aggregator'),
];
return $build;
}