You are here

public function Pattern::__construct in UI Patterns 8

Same name in this branch
  1. 8 modules/ui_patterns_ds/src/Plugin/DsFieldTemplate/Pattern.php \Drupal\ui_patterns_ds\Plugin\DsFieldTemplate\Pattern::__construct()
  2. 8 modules/ui_patterns_views/src/Plugin/views/row/Pattern.php \Drupal\ui_patterns_views\Plugin\views\row\Pattern::__construct()

Pattern constructor.

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\ui_patterns\UiPatternsManager $patterns_manager: UI Patterns manager.

\Drupal\ui_patterns\UiPatternsSourceManager $source_manager: UI Patterns source manager.

\Symfony\Component\HttpFoundation\RequestStack $parameters: Current $_POST parameters.

\Drupal\Core\Entity\EntityFieldManager $field_manager: Field manager.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler.

File

modules/ui_patterns_ds/src/Plugin/DsFieldTemplate/Pattern.php, line 83

Class

Pattern
Plugin for the expert field template.

Namespace

Drupal\ui_patterns_ds\Plugin\DsFieldTemplate

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, UiPatternsManager $patterns_manager, UiPatternsSourceManager $source_manager, RequestStack $parameters, EntityFieldManager $field_manager, ModuleHandlerInterface $module_handler) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->patternsManager = $patterns_manager;
  $this->sourceManager = $source_manager;
  $this->parameters = $parameters
    ->getCurrentRequest()->request;
  $this->fieldManager = $field_manager;
  $this->moduleHandler = $module_handler;
}