function masked_input_get_configured_definitions in Masked Input 8
Same name and namespace in other branches
- 7.2 masked_input.module \masked_input_get_configured_definitions()
Retrieve configured definitions prepared for the #definitions property of the masked_input element type.
File
- ./
masked_input.module, line 29 - Contains masked_input.module.
Code
function masked_input_get_configured_definitions() {
$definitions = array();
$masked_input_definitions = \Drupal::config('masked_input.settings')
->get('masked_input_definitions');
foreach ($masked_input_definitions as $definition) {
$definitions[$definition['character']] = $definition['regex'];
}
return $definitions;
}