public function ViewsBulkOperationsActionManager::processDefinition in Views Bulk Operations (VBO) 4.0.x
Same name and namespace in other branches
- 8.3 src/Service/ViewsBulkOperationsActionManager.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionManager::processDefinition()
- 8 src/Service/ViewsBulkOperationsActionManager.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionManager::processDefinition()
- 8.2 src/Service/ViewsBulkOperationsActionManager.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionManager::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
1 call to ViewsBulkOperationsActionManager::processDefinition()
- ViewsBulkOperationsActionManager::findDefinitions in src/
Service/ ViewsBulkOperationsActionManager.php - Finds plugin definitions.
File
- src/
Service/ ViewsBulkOperationsActionManager.php, line 183
Class
- ViewsBulkOperationsActionManager
- Defines Views Bulk Operations action manager.
Namespace
Drupal\views_bulk_operations\ServiceCode
public function processDefinition(&$definition, $plugin_id) {
// Only arrays can be operated on.
if (!is_array($definition)) {
return;
}
if (!empty($this->defaults) && is_array($this->defaults)) {
$definition = NestedArray::mergeDeep($this->defaults, $definition);
}
// Merge in defaults.
$definition += [
'confirm' => FALSE,
];
// Add default confirmation form if confirm set to TRUE
// and not explicitly set.
if ($definition['confirm'] && empty($definition['confirm_form_route_name'])) {
$definition['confirm_form_route_name'] = 'views_bulk_operations.confirm';
}
}