diff --git a/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml b/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml index ce61f44..e16db6b 100644 --- a/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml +++ b/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block.yml @@ -38,6 +38,7 @@ display: id: block_1 display_title: Block position: null + provider: block display_options: field: title: @@ -46,3 +47,6 @@ label: test_view_block module: views id: test_view_block tag: '' +dependencies: + module: + - block diff --git a/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block2.yml b/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block2.yml index 938220e..45750f4 100644 --- a/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block2.yml +++ b/core/modules/block/tests/modules/block_test_views/test_views/views.view.test_view_block2.yml @@ -34,6 +34,7 @@ display: provider: views_test_data title: test_view_block2 block_1: + provider: block display_plugin: block id: block_1 display_title: Block @@ -43,6 +44,7 @@ display: title: link_to_node: true block_2: + provider: block display_plugin: block id: block_2 display_title: Block @@ -52,6 +54,7 @@ display: title: link_to_node: true block_3: + provider: block display_plugin: block id: block_3 display_title: Block @@ -65,3 +68,6 @@ label: test_view_block2 module: views id: test_view_block2 tag: '' +dependencies: + module: + - block diff --git a/core/modules/comment/config/install/views.view.comments_recent.yml b/core/modules/comment/config/install/views.view.comments_recent.yml index f91f01a..674c8a8 100644 --- a/core/modules/comment/config/install/views.view.comments_recent.yml +++ b/core/modules/comment/config/install/views.view.comments_recent.yml @@ -3,6 +3,7 @@ status: true dependencies: module: - comment + - block id: comments_recent label: 'Recent comments' module: views @@ -231,6 +232,7 @@ display: field_langcode: '***CURRENT_LANGUAGE***' field_langcode_add_to_query: null block_1: + provider: block display_plugin: block id: block_1 display_title: Block diff --git a/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference.yml b/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference.yml index 2bb54bd..46c20ac 100644 --- a/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference.yml +++ b/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference.yml @@ -9,6 +9,7 @@ display: id: entity_reference_1 display_title: EntityReference position: null + provider: entity_reference display_options: style: type: entity_reference @@ -116,3 +117,6 @@ module: entity_reference_test id: test_entity_reference tag: '' langcode: en +dependencies: + module: + - entity_reference diff --git a/core/modules/node/config/install/views.view.archive.yml b/core/modules/node/config/install/views.view.archive.yml index 7b86429..e83b8e1 100644 --- a/core/modules/node/config/install/views.view.archive.yml +++ b/core/modules/node/config/install/views.view.archive.yml @@ -140,6 +140,7 @@ display: display_title: Block display_plugin: block position: 1 + provider: block display_options: query: type: views_query @@ -173,3 +174,5 @@ langcode: en dependencies: module: - node + - block + diff --git a/core/modules/node/config/install/views.view.content_recent.yml b/core/modules/node/config/install/views.view.content_recent.yml index 8e231b2..726628d 100644 --- a/core/modules/node/config/install/views.view.content_recent.yml +++ b/core/modules/node/config/install/views.view.content_recent.yml @@ -460,6 +460,7 @@ display: display_options: link_url: admin/content block_category: 'Lists (Views)' + provider: block label: 'Recent content' module: node id: content_recent @@ -469,3 +470,5 @@ dependencies: module: - node - user + - block + diff --git a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml index 98ec072..687f3f2 100644 --- a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml +++ b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml @@ -40,6 +40,7 @@ display: id: rest_export_1 display_title: serializer position: null + provider: rest display_options: defaults: access: false @@ -48,3 +49,6 @@ base_field: id status: true module: rest langcode: und +dependencies: + module: + - rest diff --git a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml index 33f6c94..9a85fb8 100644 --- a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml +++ b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml @@ -68,6 +68,7 @@ display: id: rest_export_1 display_title: serializer position: null + provider: rest display_options: defaults: access: false @@ -85,6 +86,7 @@ display: id: rest_export_2 display_title: 'serialize - access denied' position: null + provider: rest display_options: defaults: access: false @@ -103,3 +105,6 @@ base_field: id status: true module: rest langcode: und +dependencies: + module: + - rest diff --git a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_node_display_field.yml b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_node_display_field.yml index aa44af0..41c8241 100644 --- a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_node_display_field.yml +++ b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_node_display_field.yml @@ -102,6 +102,7 @@ display: id: rest_export_1 display_title: serializer position: null + provider: rest display_options: defaults: access: false @@ -118,3 +119,6 @@ base_field: nid status: true module: rest_test_views langcode: und +dependencies: + module: + - rest diff --git a/core/modules/user/config/install/views.view.who_s_new.yml b/core/modules/user/config/install/views.view.who_s_new.yml index 7aa3a5d..0abe6e5 100644 --- a/core/modules/user/config/install/views.view.who_s_new.yml +++ b/core/modules/user/config/install/views.view.who_s_new.yml @@ -162,6 +162,7 @@ display: id: block_1 display_title: 'Who''s new' position: 1 + provider: block display_options: display_description: 'A list of new users' block_description: 'Who''s new' @@ -174,3 +175,4 @@ langcode: en dependencies: module: - user + - block diff --git a/core/modules/user/config/install/views.view.who_s_online.yml b/core/modules/user/config/install/views.view.who_s_online.yml index 3b92c49..6040d38 100644 --- a/core/modules/user/config/install/views.view.who_s_online.yml +++ b/core/modules/user/config/install/views.view.who_s_online.yml @@ -193,6 +193,7 @@ display: id: who_s_online_block display_title: 'Who''s online' position: 1 + provider: block display_options: block_description: 'Who''s online' display_description: 'A list of users that are currently logged in.' @@ -204,3 +205,4 @@ langcode: en dependencies: module: - user + - block diff --git a/core/modules/views/config/schema/views.schema.yml b/core/modules/views/config/schema/views.schema.yml index 8b837c2..c110e44 100644 --- a/core/modules/views/config/schema/views.schema.yml +++ b/core/modules/views/config/schema/views.schema.yml @@ -115,5 +115,8 @@ views.view.*: position: type: integer label: 'Position' + provider: + type: string + label: 'Display provider module' display_options: type: views.display.[%parent.display_plugin] diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 93c446c..0f783ff 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -263,6 +263,11 @@ public function calculateDependencies() { $handler_types[] = $type['plural']; } foreach ($this->get('display') as $display) { + // Add dependency for the display itself. + if (isset($display['provider'])) { + $this->addDependency('module', $display['provider']); + } + // Collect all dependencies of all handlers. foreach ($handler_types as $handler_type) { if (!empty($display['display_options'][$handler_type])) { diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display.yml index 8ef1774..840d874 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display.yml @@ -32,6 +32,7 @@ display: display_title: Block id: block_1 position: 2 + provider: block default: display_options: access: @@ -91,3 +92,6 @@ display: label: '' id: test_display tag: '' +dependencies: + module: + - block diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_invalid.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_invalid.yml index fa7f524..638c3f5 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_invalid.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_invalid.yml @@ -30,6 +30,10 @@ display: id: block_1 display_title: Block position: 1 + provider: block label: '' id: test_display_invalid tag: '' +dependencies: + module: + - block