You are here

public function ParagraphsLanguagePlugin::__construct in Paragraphs Collection 8

ParagraphsLanguagePlugin 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\Core\Entity\EntityFieldManager $entity_field_manager: The entity field manager.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

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

Overrides ParagraphsBehaviorBase::__construct

File

src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php, line 57

Class

ParagraphsLanguagePlugin
Provides a way to hide specific paragraphs depending on the current language.

Namespace

Drupal\paragraphs_collection\Plugin\paragraphs\Behavior

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityFieldManager $entity_field_manager, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_field_manager);
  $this->languageManager = $language_manager;
  $this->moduleHandler = $module_handler;
}