public function LogCategoryManager::processDefinition in Commerce Core 8.2
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/
log/ src/ LogCategoryManager.php, line 60
Class
- LogCategoryManager
- Manages discovery and instantiation of commerce_log_category plugins.
Namespace
Drupal\commerce_logCode
public function processDefinition(&$definition, $plugin_id) {
parent::processDefinition($definition, $plugin_id);
$definition['id'] = $plugin_id;
foreach ([
'label',
'entity_type',
] as $required_property) {
if (empty($definition[$required_property])) {
throw new PluginException(sprintf('The commerce_log_category %s must define the %s property.', $plugin_id, $required_property));
}
}
}