diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 9ad0de1..3f9724b 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -100,13 +100,6 @@ class View extends ConfigEntityBase implements ViewStorageInterface { protected $executable; /** - * The views data. - * - * @var \Drupal\views\ViewsData - */ - protected $viewsData; - - /** * The module implementing this view. * * @var string diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php index 35e99be..a537fe6 100644 --- a/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -143,6 +143,12 @@ function hook_views_data() { // a field, filter, etc. you can also filter by the group. $data['example_table']['table']['group'] = t('Example table'); + // Within 'table', the value of 'provider' is the module that provides schema + // or the entity type that causes the table to exist. Setting this ensures + // that views have the correct dependencies. This is automatically set to the + // module that implements hook_views_data(). + $data['example_table']['table']['provider'] = 'example_module'; + // Some tables are "base" tables, meaning that they can be the base tables // for views. Non-base tables can only be brought in via relationships in // views based on other tables. To define a table to be a base table, add