3 namespace Drupal\node\Plugin\Block;
5 use Drupal\Core\Access\AccessResult;
6 use Drupal\Core\Block\BlockBase;
7 use Drupal\Core\Session\AccountInterface;
10 * Provides a 'Syndicate' block that links to the site's RSS feed.
13 * id = "node_syndicate_block",
14 * admin_label = @Translation("Syndicate"),
15 * category = @Translation("System")
18 class SyndicateBlock extends BlockBase {
23 public function defaultConfiguration() {
32 protected function blockAccess(AccountInterface $account) {
33 return AccessResult::allowedIfHasPermission($account, 'access content');
39 public function build() {
41 '#theme' => 'feed_icon',