Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SyndicateBlock.php

function SyndicateBlock::build

Overrides BlockPluginInterface::build

File

core/modules/node/src/Plugin/Block/SyndicateBlock.php, line 81

Class

SyndicateBlock
Provides a 'Syndicate' block that links to the site's RSS feed.

Namespace

Drupal\node\Plugin\Block

Code

public function build() {
    $title = $this->configuration['label'];
    return [
        '#theme' => 'feed_icon',
        '#url' => Url::fromUri('internal:/rss.xml'),
        '#title' => $title,
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal