
| Current Path : /var/www/html_old/12park.001/web/core/modules/node/src/Plugin/Block/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html_old/12park.001/web/core/modules/node/src/Plugin/Block/SyndicateBlock.php |
<?php
namespace Drupal\node\Plugin\Block;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Session\AccountInterface;
/**
* Provides a 'Syndicate' block that links to the site's RSS feed.
*
* @Block(
* id = "node_syndicate_block",
* admin_label = @Translation("Syndicate"),
* category = @Translation("System")
* )
*/
class SyndicateBlock extends BlockBase {
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [
'block_count' => 10,
];
}
/**
* {@inheritdoc}
*/
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermission($account, 'access content');
}
/**
* {@inheritdoc}
*/
public function build() {
return [
'#theme' => 'feed_icon',
'#url' => 'rss.xml',
];
}
}