protected function JsonFeedSerializer::getTitle in JSON Feed 8
Get the feed title.
Return value
string The title to use for the feed
1 call to JsonFeedSerializer::getTitle()
- JsonFeedSerializer::render in src/
Plugin/ views/ style/ JsonFeedSerializer.php - Render the display in this style.
File
- src/
Plugin/ views/ style/ JsonFeedSerializer.php, line 225
Class
- JsonFeedSerializer
- Default style plugin to render a JSON feed.
Namespace
Drupal\json_feed\Plugin\views\styleCode
protected function getTitle() {
$config = \Drupal::config('system.site');
// Find title.
if ($this->view->display_handler
->getOption('sitename_title')) {
$title = $config
->get('name');
if ($slogan = $config
->get('slogan')) {
$title .= ' - ' . $slogan;
}
}
else {
$title = $this->view
->getTitle();
}
return $title;
}