protected function AggregatorController::buildPageList in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/aggregator/src/Controller/AggregatorController.php \Drupal\aggregator\Controller\AggregatorController::buildPageList()
Builds a listing of aggregator feed items.
Parameters
\Drupal\aggregator\ItemInterface[] $items: The items to be listed.
array|string $feed_source: The feed source URL.
Return value
array The rendered list of items for the feed.
1 call to AggregatorController::buildPageList()
- AggregatorController::pageLast in core/
modules/ aggregator/ src/ Controller/ AggregatorController.php - Displays the most recent items gathered from any feed.
File
- core/
modules/ aggregator/ src/ Controller/ AggregatorController.php, line 73 - Contains \Drupal\aggregator\Controller\AggregatorController.
Class
- AggregatorController
- Returns responses for aggregator module routes.
Namespace
Drupal\aggregator\ControllerCode
protected function buildPageList(array $items, $feed_source = '') {
// Assemble output.
$build = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'aggregator-wrapper',
),
),
);
$build['feed_source'] = is_array($feed_source) ? $feed_source : array(
'#markup' => $feed_source,
);
if ($items) {
$build['items'] = $this
->entityManager()
->getViewBuilder('aggregator_item')
->viewMultiple($items, 'default');
$build['pager'] = array(
'#type' => 'pager',
);
}
return $build;
}