class SyndicateBlock
Same name in other branches
- 9 core/modules/node/src/Plugin/Block/SyndicateBlock.php \Drupal\node\Plugin\Block\SyndicateBlock
- 10 core/modules/node/src/Plugin/Block/SyndicateBlock.php \Drupal\node\Plugin\Block\SyndicateBlock
- 11.x core/modules/node/src/Plugin/Block/SyndicateBlock.php \Drupal\node\Plugin\Block\SyndicateBlock
Provides a 'Syndicate' block that links to the site's RSS feed.
Plugin annotation
@Block(
id = "node_syndicate_block",
admin_label = @Translation("Syndicate"),
category = @Translation("System")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Component\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\ContextAwarePluginInterface
- class \Drupal\Core\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\ContextAwarePluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\TypedData\TypedDataTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Plugin\ContextAwarePluginBase implements \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Render\PreviewFallbackInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\node\Plugin\Block\SyndicateBlock extends \Drupal\Core\Block\BlockBase
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Plugin\ContextAwarePluginBase implements \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Render\PreviewFallbackInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\Core\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\ContextAwarePluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\TypedData\TypedDataTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Component\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\ContextAwarePluginInterface
Expanded class hierarchy of SyndicateBlock
File
-
core/
modules/ node/ src/ Plugin/ Block/ SyndicateBlock.php, line 18
Namespace
Drupal\node\Plugin\BlockView source
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',
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
SyndicateBlock::blockAccess | protected | function | |
SyndicateBlock::build | public | function | |
SyndicateBlock::defaultConfiguration | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.