public function BlockBase::__construct

Constructs a Drupal\Component\Plugin\PluginBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

Overrides PluginBase::__construct

1 call to BlockBase::__construct()
ViewsBlock::__construct in drupal/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
Overrides \Drupal\Component\Plugin\PluginBase::__construct().
1 method overrides BlockBase::__construct()
ViewsBlock::__construct in drupal/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
Overrides \Drupal\Component\Plugin\PluginBase::__construct().

File

drupal/core/modules/block/lib/Drupal/block/BlockBase.php, line 24
Contains \Drupal\block\BlockBase.

Class

BlockBase
Defines a base block implementation that most blocks plugins will extend.

Namespace

Drupal\block

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->configuration += $this
    ->settings() + array(
    'label' => '',
    'module' => $plugin_definition['module'],
    'label_display' => BLOCK_LABEL_VISIBLE,
    'cache' => DRUPAL_NO_CACHE,
  );
}