protected AggregatorController::buildPageList(array $items, $feed_source = '')
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.
File
- core/modules/aggregator/src/Controller/AggregatorController.php, line 68
Class
- AggregatorController
- Returns responses for aggregator module routes.
Namespace
Drupal\aggregator\Controller
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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 ; } |
Please login to continue.