public function ViewsBlock::__construct

Overrides \Drupal\Component\Plugin\PluginBase::__construct().

Overrides BlockBase::__construct

File

drupal/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php, line 43
Contains \Drupal\views\Plugin\Block\ViewsBlock.

Class

ViewsBlock
Provides a generic Views block.

Namespace

Drupal\views\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  list($plugin, $delta) = explode(':', $this
    ->getPluginId());
  list($name, $this->displayID) = explode('-', $delta, 2);

  // Load the view.
  $this->view = views_get_view($name);
}