public function NumberPatternBase::__construct in Commerce Core 8.2
Constructs a new NumberPatternBase 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\Utility\Token $token: The token service.
Overrides PluginBase::__construct
1 call to NumberPatternBase::__construct()
- SequentialNumberPatternBase::__construct in modules/
number_pattern/ src/ Plugin/ Commerce/ NumberPattern/ SequentialNumberPatternBase.php - Constructs a new SequentialNumberPatternBase object.
1 method overrides NumberPatternBase::__construct()
- SequentialNumberPatternBase::__construct in modules/
number_pattern/ src/ Plugin/ Commerce/ NumberPattern/ SequentialNumberPatternBase.php - Constructs a new SequentialNumberPatternBase object.
File
- modules/
number_pattern/ src/ Plugin/ Commerce/ NumberPattern/ NumberPatternBase.php, line 46
Class
- NumberPatternBase
- Provides a base class for number pattern plugins.
Namespace
Drupal\commerce_number_pattern\Plugin\Commerce\NumberPatternCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, Token $token) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->token = $token;
if (array_key_exists('_entity', $configuration)) {
$this->parentEntity = $configuration['_entity'];
unset($configuration['_entity']);
}
$this
->setConfiguration($configuration);
}