BulkEditDeriver.php in Views Bulk Edit 8
File
src/Plugin/Derivative/BulkEditDeriver.php
View source
<?php
namespace Drupal\views_bulk_edit\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DeriverBase;
class BulkEditDeriver extends DeriverBase {
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this
->getEnabledEntityTypeIds() as $entity_type_id) {
$this->derivatives[$entity_type_id] = $base_plugin_definition;
$this->derivatives[$entity_type_id]['type'] = $entity_type_id;
}
return $this->derivatives;
}
protected function getEnabledEntityTypeIds() {
return \Drupal::config('views_bulk_edit.settings')
->get('enabled_entity_type_ids') ?: [
'node',
];
}
}