1 views_ui_base_views_wizard.php ViewsUiBaseViewsWizard::__construct($plugin)

Overrides ViewsWizardInterface::__construct

File

core/modules/views_ui/wizards/views_ui_base_views_wizard.php, line 56
Provides the interface and base class for Views Wizard plugins.

Class

ViewsUiBaseViewsWizard
A very generic Views Wizard class - can be constructed for any base table.

Code

function __construct($plugin) {
  $this->base_table = $plugin['base_table'];
  $default = $this->filter_defaults;

  if (isset($plugin['filters'])) {
    foreach ($plugin['filters'] as $name => $info) {
      $default['id'] = $name;
      $plugin['filters'][$name] = $info + $default;
    }
  }

  $this->plugin = $plugin;

  $entities = entity_get_info();
  foreach ($entities as $entity_type => $entity_info) {
    if (isset($entity_info['base table']) && $this->base_table == $entity_info['base table']) {
      $this->entity_info = $entity_info;
      $this->entity_type = $entity_type;
    }
  }
}