class Block
Same name in this branch
- 8.9.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
- 8.9.x core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
- 8.9.x core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
Same name in other branches
- 9 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
- 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
- 9 core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
- 9 core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block
- 10 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
- 10 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
- 10 core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
- 10 core/lib/Drupal/Core/Block/Attribute/Block.php \Drupal\Core\Block\Attribute\Block
- 10 core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block
- 11.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
- 11.x core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
- 11.x core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
- 11.x core/lib/Drupal/Core/Block/Attribute/Block.php \Drupal\Core\Block\Attribute\Block
- 11.x core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block
Defines a Block annotation object.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
- class \Drupal\Core\Block\Annotation\Block extends \Drupal\Component\Annotation\Plugin
Expanded class hierarchy of Block
Related topics
197 string references to 'Block'
- aggregator_help in core/
modules/ aggregator/ aggregator.module - Implements hook_help().
- AjaxFormCacheTest::testBlockForms in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ AjaxFormCacheTest.php - Tests AJAX forms in blocks.
- AjaxFormCacheTest::testQueryString in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ AjaxFormCacheTest.php - Tests AJAX forms on pages with a query string.
- AreaDisplayLinkTest::setUp in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaDisplayLinkTest.php - block.info.yml in core/
modules/ block/ block.info.yml - core/modules/block/block.info.yml
47 classes are annotated with Block
- ActiveTopicsBlock in core/
modules/ forum/ src/ Plugin/ Block/ ActiveTopicsBlock.php - Provides an 'Active forum topics' block.
- AggregatorFeedBlock in core/
modules/ aggregator/ src/ Plugin/ Block/ AggregatorFeedBlock.php - Provides an 'Aggregator feed' block with the latest items from the feed.
- AjaxFormBlock in core/
modules/ system/ tests/ modules/ ajax_forms_test/ src/ Plugin/ Block/ AjaxFormBlock.php - Provides an AJAX form block.
- AttachedRenderingBlock in core/
modules/ system/ tests/ modules/ render_attached_test/ src/ Plugin/ Block/ AttachedRenderingBlock.php - A block we can use to test caching of #attached headers.
- BlockContentBlock in core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php - Defines a generic custom block type.
File
-
core/
lib/ Drupal/ Core/ Block/ Annotation/ Block.php, line 14
Namespace
Drupal\Core\Block\AnnotationView source
class Block extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The administrative label of the block.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $admin_label = '';
/**
* The category in the admin UI where the block will be listed.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $category = '';
/**
* An array of context definitions describing the context used by the plugin.
*
* The array is keyed by context names.
*
* @var \Drupal\Core\Annotation\ContextDefinition[]
*
* @deprecated Providing context definitions via the "context" key is
* deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use
* the "context_definitions" key instead.
*/
public $context = [];
/**
* An array of context definitions describing the context used by the plugin.
*
* The array is keyed by context names.
*
* @var \Drupal\Core\Annotation\ContextDefinition[]
*/
public $context_definitions = [];
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|---|
Block::$admin_label | public | property | The administrative label of the block. | |||
Block::$category | public | property | The category in the admin UI where the block will be listed. | |||
Block::$context | Deprecated | public | property | An array of context definitions describing the context used by the plugin. | ||
Block::$context_definitions | public | property | An array of context definitions describing the context used by the plugin. | |||
Block::$id | public | property | The plugin ID. | |||
Plugin::$definition | protected | property | The plugin definition read from the class annotation. | 1 | ||
Plugin::get | public | function | Gets the value of an annotation. | Overrides AnnotationInterface::get | 5 | |
Plugin::getClass | public | function | Gets the class of the annotated class. | Overrides AnnotationInterface::getClass | ||
Plugin::getId | public | function | Gets the unique ID for this annotated class. | Overrides AnnotationInterface::getId | ||
Plugin::getProvider | public | function | Gets the name of the provider of the annotated class. | Overrides AnnotationInterface::getProvider | 1 | |
Plugin::parse | protected | function | Parses an annotation into its definition. | |||
Plugin::setClass | public | function | Sets the class of the annotated class. | Overrides AnnotationInterface::setClass | ||
Plugin::setProvider | public | function | Sets the name of the provider of the annotated class. | Overrides AnnotationInterface::setProvider | ||
Plugin::__construct | public | function | Constructs a Plugin object. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.