class Block
Same name in this branch
- 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/Annotation/Block.php \Drupal\Core\Block\Annotation\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
- 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
- 8.9.x 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
The Block attribute.
Hierarchy
- class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
Expanded class hierarchy of Block
55 files declare their use of Block
- ActiveTopicsBlock.php in core/
modules/ forum/ src/ Plugin/ Block/ ActiveTopicsBlock.php - AjaxFormBlock.php in core/
modules/ system/ tests/ modules/ ajax_forms_test/ src/ Plugin/ Block/ AjaxFormBlock.php - AttachedRenderingBlock.php in core/
modules/ system/ tests/ modules/ render_attached_test/ src/ Plugin/ Block/ AttachedRenderingBlock.php - BlockContentBlock.php in core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php - BlockManager.php in core/
lib/ Drupal/ Core/ Block/ BlockManager.php
207 string references to 'Block'
- 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 - BigPipeInterfacePreviewThemeSuggestionsTest::setUp in core/
modules/ big_pipe/ tests/ src/ Kernel/ BigPipeInterfacePreviewThemeSuggestionsTest.php - big_pipe_theme_suggestions_big_pipe_interface_preview in core/
modules/ big_pipe/ big_pipe.module - Implements hook_theme_suggestions_HOOK().
File
-
core/
lib/ Drupal/ Core/ Block/ Attribute/ Block.php, line 11
Namespace
Drupal\Core\Block\AttributeView source
class Block extends Plugin {
/**
* Constructs a Block attribute.
*
* @param string $id
* The plugin ID.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $admin_label
* The administrative label of the block.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $category
* (optional) The category in the admin UI where the block will be listed.
* @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface[] $context_definitions
* (optional) An array of context definitions describing the context used by
* the plugin. The array is keyed by context names.
* @param class-string|null $deriver
* (optional) The deriver class.
* @param array<string, string|false> $forms
* (optional) An array of form class names or FALSE, keyed by a string.
*/
public function __construct(string $id, ?TranslatableMarkup $admin_label = NULL, ?TranslatableMarkup $category = NULL, array $context_definitions = [], ?string $deriver = NULL, array $forms = []) {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AttributeBase::$class | protected | property | The class used for this attribute class. | ||
AttributeBase::$provider | protected | property | The provider of the attribute class. | ||
AttributeBase::get | public | function | Gets the value of an attribute. | Overrides AttributeInterface::get | 6 |
AttributeBase::getClass | public | function | Gets the class of the attribute class. | Overrides AttributeInterface::getClass | 1 |
AttributeBase::getId | public | function | Gets the unique ID for this attribute class. | Overrides AttributeInterface::getId | |
AttributeBase::getProvider | public | function | Gets the name of the provider of the attribute class. | Overrides AttributeInterface::getProvider | |
AttributeBase::setClass | public | function | Sets the class of the attributed class. | Overrides AttributeInterface::setClass | 1 |
AttributeBase::setProvider | public | function | Sets the name of the provider of the attribute class. | Overrides AttributeInterface::setProvider | |
Block::__construct | public | function | Constructs a Block attribute. | Overrides Plugin::__construct |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.