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/Type/DefaultWizardDeriver.php, line 37
Definition of Drupal\views\Plugin\Type\DefaultWizardDeriver.

Class

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

Namespace

Drupal\views\Plugin\Type

Code

public function getDerivativeDefinitions(array $base_plugin_definition) {
  $base_tables = array_keys(views_fetch_base_tables());
  $this->derivatives = array();
  foreach ($base_tables as $table) {
    $views_info = views_fetch_data($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;
}