class DefaultWizardDeriver

Same name in other branches
  1. 9 core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php \Drupal\views\Plugin\Derivative\DefaultWizardDeriver
  2. 8.9.x core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php \Drupal\views\Plugin\Derivative\DefaultWizardDeriver
  3. 10 core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php \Drupal\views\Plugin\Derivative\DefaultWizardDeriver

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

The derivatives store all base table plugin information.

Hierarchy

Expanded class hierarchy of DefaultWizardDeriver

1 file declares its use of DefaultWizardDeriver
Standard.php in core/modules/views/src/Plugin/views/wizard/Standard.php

File

core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php, line 13

Namespace

Drupal\views\Plugin\Derivative
View source
class DefaultWizardDeriver extends DeriverBase {
    
    /**
     * {@inheritdoc}
     */
    public function getDerivativeDefinitions($base_plugin_definition) {
        $views_data = Views::viewsData();
        $base_tables = array_keys($views_data->fetchBaseTables());
        $this->derivatives = [];
        foreach ($base_tables as $table) {
            $views_info = $views_data->get($table);
            if (empty($views_info['table']['wizard_id'])) {
                $this->derivatives[$table] = [
                    'id' => 'standard',
                    'base_table' => $table,
                    'title' => $views_info['table']['base']['title'],
                    'class' => 'Drupal\\views\\Plugin\\views\\wizard\\Standard',
                ];
            }
        }
        return parent::getDerivativeDefinitions($base_plugin_definition);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
DefaultWizardDeriver::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides DeriverBase::getDerivativeDefinitions
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.