function BlockPluginTrait::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::__construct()
  2. 8.9.x core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::__construct()
  3. 10 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::__construct()
25 methods override BlockPluginTrait::__construct()
AjaxFormBlock::__construct in core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php
Constructs a new AjaxFormBlock.
AnnounceBlock::__construct in core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php
Constructs a new AnnouncementsFeedBlock instance.
BlockContentBlock::__construct in core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
Constructs a new BlockContentBlock.
BookNavigationBlock::__construct in core/modules/book/src/Plugin/Block/BookNavigationBlock.php
Constructs a new BookNavigationBlock instance.
Broken::__construct in core/lib/Drupal/Core/Block/Plugin/Block/Broken.php
Creates a Broken Block instance.

... See full list

File

core/lib/Drupal/Core/Block/BlockPluginTrait.php, line 64

Class

BlockPluginTrait
Provides the base implementation of a block plugin.

Namespace

Drupal\Core\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->setConfiguration($configuration);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.