function AggregatorController::feedTitle

Same name in other branches
  1. 9 core/modules/aggregator/src/Controller/AggregatorController.php \Drupal\aggregator\Controller\AggregatorController::feedTitle()

Route title callback.

Parameters

\Drupal\aggregator\FeedInterface $aggregator_feed: The aggregator feed.

Return value

array The feed label as a render array.

File

core/modules/aggregator/src/Controller/AggregatorController.php, line 191

Class

AggregatorController
Returns responses for aggregator module routes.

Namespace

Drupal\aggregator\Controller

Code

public function feedTitle(FeedInterface $aggregator_feed) {
    return [
        '#markup' => $aggregator_feed->label(),
        '#allowed_tags' => Xss::getHtmlTagList(),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.