function NumberListField::__construct
Constructs a Handler 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 HandlerBase::__construct
File
-
core/
modules/ options/ src/ Plugin/ views/ argument/ NumberListField.php, line 38
Class
- NumberListField
- Argument handler for list field to show human readable name in the summary.
Namespace
Drupal\options\Plugin\views\argumentCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ?OptionsAllowedValuesInterface $options_allowed_values = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
if (!$options_allowed_values) {
@trigger_error('Calling ' . __METHOD__ . '() without the $options_allowed_values argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3572185', E_USER_DEPRECATED);
$options_allowed_values = \Drupal::service(OptionsAllowedValuesInterface::class);
}
$this->optionsAllowedValues = $options_allowed_values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.