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 ce61f44ce60ba2fd53204d7c2753e96ecf78b0fb..e16db6bcf8e2eaa6ef5739bdcf2bc23da68d4033 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 938220ef8cc38b470f416d69cf1d9268d4b5d057..45750f45a53eddfb7931689cb880c49dcabfd29b 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 f91f01a544e6940c9fe3e5b57af24d61edcbd8c6..674c8a8a32c72900cfc1a76795b1fa309fbc4a2e 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 2bb54bd6ef0e43c0af411e3c374f844aa36ba177..46c20aca8ec6d5f8befbcb9cdfd0278b70309ba9 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 7b8642973b3562cf19dca55a24e8e6733953846e..e83b8e17b763d31762efcb1b5c2275e60605ff6b 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 8e231b2ca968926675cc919ca7d7fb917bc3c5be..726628d8bfd37be07381d02aca04e80432dd0e6d 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 98ec072670382543cb40a7e447f2f6b22bbac29e..687f3f2286d84046dc74238676445d514df55d76 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 33f6c94413205179dce7352d09d8f08b5cc36ac6..9a85fb8c3c5c12a41456930fda97b4834d6e4551 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 aa44af08ee406b46e4807bd0ece202a8f21c2642..41c82414a6dd3c2956218f9d93da0156b030622d 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 7aa3a5d8738306ad728057c50bd868afb3a917c8..0abe6e52a4a3e3cbab8de4ca9953a94112bb8c78 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 3b92c4936c9dba7ad565f2e4f878aa5b3f058654..6040d381ff31730a434329a868bec675bef1da06 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 8b837c2a247c034fbd279cd1491e9b31fec4ef3c..c110e44f2128600c9fbff80872d1e284a1d29d8d 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 93c446cc32b15442ea464be16f23c78cde38a590..0f783ffaa374043825a95902d92059a74f45a985 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 8ef1774877961cbf6ac88dfd3553aafcb28798c3..840d8741726f2e95a81378c96ac63509a3848a0a 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 fa7f52470779b0bcc172dce56080cb736e76de58..638c3f58a1ae389c4977b5acf14926a632b47273 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 diff --git a/core/modules/views/tests/src/Entity/ViewTest.php b/core/modules/views/tests/src/Entity/ViewTest.php index 520c6a26bc09c22bc4d15378e0594975d787f0cf..6bfdd5ba6ebd9d7a67a1ac332f2907d3cd7e3d6d 100644 --- a/core/modules/views/tests/src/Entity/ViewTest.php +++ b/core/modules/views/tests/src/Entity/ViewTest.php @@ -50,6 +50,7 @@ public function testCalculateDependencies($values, $deps) { } public function calculateDependenciesProvider(){ + $handler['display']['default']['provider'] = 'block'; $handler['display']['default']['display_options']['fields']['example']['dependencies'] = array(); $handler['display']['default']['display_options']['fields']['example2']['dependencies']['module'] = array('views', 'field'); $handler['display']['default']['display_options']['fields']['example3']['dependencies']['module'] = array('views', 'image'); @@ -60,7 +61,7 @@ public function calculateDependenciesProvider(){ return array( array(array(), array('node', 'views')), - array($handler, array('field', 'image', 'node', 'views')), + array($handler, array('block', 'field', 'image', 'node', 'views')), array($plugin, array('field', 'image', 'node', 'views')), ); }