public function StockEventsManager::processDefinition in Commerce Stock 8
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
- src/
StockEventsManager.php, line 48
Class
- StockEventsManager
- Provides the default stock_events manager.
Namespace
Drupal\commerce_stockCode
public function processDefinition(&$definition, $plugin_id) {
parent::processDefinition($definition, $plugin_id);
// You can add validation of the plugin definition here.
if (empty($definition['id'])) {
throw new PluginException(sprintf('plugin property (%s) definition "is" is required.', $plugin_id));
}
}