public function MefibsExposedFilterBlock::__construct in MEFIBS - More exposed forms in blocks 8
Same name in this branch
- 8 lib/Drupal/mefibs/Plugin/Derivative/MefibsExposedFilterBlock.php \Drupal\mefibs\Plugin\Derivative\MefibsExposedFilterBlock::__construct()
- 8 lib/Drupal/mefibs/Plugin/Block/MefibsExposedFilterBlock.php \Drupal\mefibs\Plugin\Block\MefibsExposedFilterBlock::__construct()
Constructs a \Drupal\views\Plugin\Block\ViewsBlockBase 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.
\Drupal\views\ViewExecutableFactory $executable_factory: The view executable factory.
\Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller: The views storage controller.
\Drupal\Core\Session\AccountInterface $user: The current user.
Overrides ViewsBlockBase::__construct
File
- lib/
Drupal/ mefibs/ Plugin/ Block/ MefibsExposedFilterBlock.php, line 48 - Contains \Drupal\mefibs\Plugin\Block\MefibsExposedFilterBlock.
Class
- MefibsExposedFilterBlock
- Provides an extra 'Views Exposed Filter' block.
Namespace
Drupal\mefibs\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, ViewExecutableFactory $executable_factory, EntityStorageControllerInterface $storage_controller, AccountInterface $user) {
$this->pluginId = $plugin_id;
$delta = $this
->getDerivativeId();
list($name, $this->displayID, $block_id) = explode('-', $delta, 3);
// Load the view.
$view = $storage_controller
->load($name);
$this->view = $executable_factory
->get($view);
$this->displaySet = $this->view
->setDisplay($this->displayID);
$this->block_id = $block_id;
$this->user = $user;
// Don't call parent here because we already have replicated appropriate
// logic from ViewsBlockBase::__construct.
BlockBase::__construct($configuration, $plugin_id, $plugin_definition);
}