function View::isInstallable

Same name and namespace in other branches
  1. 9 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::isInstallable()
  2. 10 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::isInstallable()
  3. 11.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::isInstallable()

Overrides ConfigEntityBase::isInstallable

File

core/modules/views/src/Entity/View.php, line 497

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function isInstallable() {
    $table_definition = \Drupal::service('views.views_data')->get($this->base_table);
    // Check whether the base table definition exists and contains a base table
    // definition. For example, taxonomy_views_data_alter() defines
    // node_field_data even if it doesn't exist as a base table.
    return $table_definition && isset($table_definition['table']['base']);
}

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