class Block

Same name in this branch
  1. 11.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
  2. 11.x core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
  3. 11.x core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
  4. 11.x core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block
Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
  2. 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
  3. 9 core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
  4. 9 core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block
  5. 8.9.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
  6. 8.9.x core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
  7. 8.9.x core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
  8. 8.9.x core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block
  9. 10 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block
  10. 10 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block
  11. 10 core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block
  12. 10 core/lib/Drupal/Core/Block/Attribute/Block.php \Drupal\Core\Block\Attribute\Block
  13. 10 core/lib/Drupal/Core/Block/Annotation/Block.php \Drupal\Core\Block\Annotation\Block

The Block attribute.

Hierarchy

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

... See full list

216 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().

... See full list

File

core/lib/Drupal/Core/Block/Attribute/Block.php, line 11

Namespace

Drupal\Core\Block\Attribute
View 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 Overrides AttributeInterface::get 6
AttributeBase::getClass public function Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Overrides AttributeInterface::getId
AttributeBase::getProvider public function Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function 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.