public function DefaultWizardDeriver::getDerivativeDefinitions

Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().

Overrides DerivativeInterface::getDerivativeDefinitions

1 call to DefaultWizardDeriver::getDerivativeDefinitions()

File

drupal/core/modules/views/lib/Drupal/views/Plugin/Derivative/DefaultWizardDeriver.php, line 38
Contains \Drupal\views\Plugin\Derivative\DefaultWizardDeriver.

Class

DefaultWizardDeriver
A derivative class which provides automatic wizards for all base tables.

Namespace

Drupal\views\Plugin\Derivative

Code

public function getDerivativeDefinitions(array $base_plugin_definition) {
  $views_data = Views::viewsData();
  $base_tables = array_keys($views_data
    ->fetchBaseTables());
  $this->derivatives = array();
  foreach ($base_tables as $table) {
    $views_info = $views_data
      ->get($table);
    if (empty($views_info['table']['wizard_id'])) {
      $this->derivatives[$table] = array(
        'id' => 'standard',
        'base_table' => $table,
        'title' => $views_info['table']['base']['title'],
        'class' => 'Drupal\\views\\Plugin\\views\\wizard\\Standard',
      );
    }
  }
  return $this->derivatives;
}