public function DeclaredEmailManager::processDefinition in Easy Email 8
Same name and namespace in other branches
- 2.0.x modules/easy_email_override/src/Service/DeclaredEmailManager.php \Drupal\easy_email_override\Service\DeclaredEmailManager::processDefinition()
Performs extra processing on plugin definitions.
By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.
Overrides DefaultPluginManager::processDefinition
File
- modules/
easy_email_override/ src/ Service/ DeclaredEmailManager.php, line 92
Class
- DeclaredEmailManager
- Manages discovery and instantiation of email plugins.
Namespace
Drupal\easy_email_override\ServiceCode
public function processDefinition(&$definition, $plugin_id) {
parent::processDefinition($definition, $plugin_id);
$definition['id'] = $plugin_id;
foreach ([
'label',
'module',
'key',
] as $required_property) {
if (empty($definition[$required_property])) {
throw new PluginException(sprintf('The email %s must define the %s property.', $plugin_id, $required_property));
}
}
}