public function DynamicLayout::__construct in Dynamic Layouts 8
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.
Overrides LayoutDefault::__construct
File
- src/
Plugin/ Layout/ DynamicLayout.php, line 37
Class
- DynamicLayout
- Dynamically prepare the dynamic layout build.
Namespace
Drupal\dynamic_layouts\Plugin\LayoutCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entityTypeManager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entityTypeManager;
$this->settings = $this->entityTypeManager
->getStorage('dynamic_layout_settings')
->load('settings');
}