Provides a 'Syndicate' block that links to the site's RSS feed.
@Plugin(
id = "node_syndicate_block",
admin_label = @Translation("Syndicate"),
module = "node"
)
Expanded class hierarchy of SyndicateBlock
class SyndicateBlock extends BlockBase {
/**
* Overrides \Drupal\block\BlockBase::settings().
*/
public function settings() {
return array(
'block_count' => 10,
);
}
/**
* Overrides \Drupal\block\BlockBase::access().
*/
public function access() {
return user_access('access content');
}
/**
* {@inheritdoc}
*/
public function build() {
return array(
'#theme' => 'feed_icon',
'#url' => 'rss.xml',
);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockBase:: |
public | function | Returns the configuration form elements specific to this block plugin. | 11 |
BlockBase:: |
public | function | Adds block type-specific submission handling for the block form. | 11 |
BlockBase:: |
public | function | Adds block type-specific validation for the block form. | |
BlockBase:: |
public | function |
Implements \Drupal\block\BlockPluginInterface::form(). Overrides BlockPluginInterface:: |
1 |
BlockBase:: |
public | function | Returns the configuration data for the block plugin. | |
BlockBase:: |
public | function | Sets a particular value in the block settings. | |
BlockBase:: |
public | function |
Implements \Drupal\block\BlockPluginInterface::submit(). Overrides BlockPluginInterface:: |
|
BlockBase:: |
public | function |
Implements \Drupal\block\BlockPluginInterface::validate(). Overrides BlockPluginInterface:: |
|
BlockBase:: |
public | function |
Constructs a Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
1 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
public | function |
Returns the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
SyndicateBlock:: |
public | function |
Overrides \Drupal\block\BlockBase::access(). Overrides BlockBase:: |
|
SyndicateBlock:: |
public | function |
Builds and returns the renderable array for this block plugin. Overrides BlockPluginInterface:: |
|
SyndicateBlock:: |
public | function |
Overrides \Drupal\block\BlockBase::settings(). Overrides BlockBase:: |