You are here

public function CpfCnpjBase::__construct in Brazilian IDs 8

Constructs a Drupal\brazilian_ids\Element\CnpjElement 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: Module handler to check if other modules are enabled.

Overrides PluginBase::__construct

File

src/Element/CpfCnpjBase.php, line 33

Class

CpfCnpjBase
Base class for CPF and CNPJ elements.

Namespace

Drupal\brazilian_ids\Element

Code

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