You are here

public function EntityViewModeRestriction::__construct in Layout Builder Restrictions 8.2

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.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

Drupal\Core\Database\Connection $connection: The database connection.

Overrides PluginBase::__construct

File

src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php, line 55

Class

EntityViewModeRestriction
Controls behavior of the per-view mode plugin.

Namespace

Drupal\layout_builder_restrictions\Plugin\LayoutBuilderRestriction

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, Connection $connection) {
  $this->configuration = $configuration;
  $this->pluginId = $plugin_id;
  $this->pluginDefinition = $plugin_definition;
  $this->moduleHandler = $module_handler;
  $this->database = $connection;
}