Loading core/modules/content_moderation/tests/modules/content_moderation_test_views/config/install/views.view.test_content_moderation_state_sort_base_table.yml +1 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ display: order: ASC expose: label: 'Moderation state' field_identifier: moderation_state exposed: true arguments: { } filters: { } Loading core/modules/content_moderation/tests/modules/content_moderation_test_views/config/install/views.view.test_content_moderation_state_sort_revision_table.yml +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ display: order: ASC expose: label: 'Moderation state' field_identifier: moderation_state exposed: true arguments: { } filters: { } Loading core/modules/views/src/ViewsConfigUpdater.php +0 −37 Original line number Diff line number Diff line Loading @@ -122,9 +122,6 @@ public function setDeprecationsEnabled($enabled) { public function updateAll(ViewEntityInterface $view) { return $this->processDisplayHandlers($view, FALSE, function (&$handler, $handler_type, $key, $display_id) use ($view) { $changed = FALSE; if ($this->processSortFieldIdentifierUpdateHandler($handler, $handler_type)) { $changed = TRUE; } if ($this->processImageLazyLoadFieldHandler($handler, $handler_type, $view)) { $changed = TRUE; } Loading Loading @@ -173,21 +170,6 @@ protected function processDisplayHandlers(ViewEntityInterface $view, $return_on_ return $changed; } /** * Updates the sort handlers by adding default sort field identifiers. * * @param \Drupal\views\ViewEntityInterface $view * The View to update. * * @return bool * Whether the view was updated. */ public function needsSortFieldIdentifierUpdate(ViewEntityInterface $view): bool { return $this->processDisplayHandlers($view, TRUE, function (array &$handler, string $handler_type): bool { return $this->processSortFieldIdentifierUpdateHandler($handler, $handler_type); }); } /** * Add lazy load options to all image type field configurations. * Loading Loading @@ -232,23 +214,4 @@ protected function processImageLazyLoadFieldHandler(array &$handler, string $han return $changed; } /** * Processes sort handlers by adding the sort identifier. * * @param array $handler * A display handler. * @param string $handler_type * The handler type. * * @return bool * Whether the handler was updated. */ protected function processSortFieldIdentifierUpdateHandler(array &$handler, string $handler_type): bool { if ($handler_type === 'sort' && !isset($handler['expose']['field_identifier'])) { $handler['expose']['field_identifier'] = $handler['id']; return TRUE; } return FALSE; } } core/modules/views/tests/modules/views_test_config/test_views/views.view.test_exposed_form_sort_items_per_page.yml +1 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ display: order: asc expose: label: 'id' field_identifier: id exposed: true plugin_id: standard display_plugin: default Loading Loading
core/modules/content_moderation/tests/modules/content_moderation_test_views/config/install/views.view.test_content_moderation_state_sort_base_table.yml +1 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ display: order: ASC expose: label: 'Moderation state' field_identifier: moderation_state exposed: true arguments: { } filters: { } Loading
core/modules/content_moderation/tests/modules/content_moderation_test_views/config/install/views.view.test_content_moderation_state_sort_revision_table.yml +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ display: order: ASC expose: label: 'Moderation state' field_identifier: moderation_state exposed: true arguments: { } filters: { } Loading
core/modules/views/src/ViewsConfigUpdater.php +0 −37 Original line number Diff line number Diff line Loading @@ -122,9 +122,6 @@ public function setDeprecationsEnabled($enabled) { public function updateAll(ViewEntityInterface $view) { return $this->processDisplayHandlers($view, FALSE, function (&$handler, $handler_type, $key, $display_id) use ($view) { $changed = FALSE; if ($this->processSortFieldIdentifierUpdateHandler($handler, $handler_type)) { $changed = TRUE; } if ($this->processImageLazyLoadFieldHandler($handler, $handler_type, $view)) { $changed = TRUE; } Loading Loading @@ -173,21 +170,6 @@ protected function processDisplayHandlers(ViewEntityInterface $view, $return_on_ return $changed; } /** * Updates the sort handlers by adding default sort field identifiers. * * @param \Drupal\views\ViewEntityInterface $view * The View to update. * * @return bool * Whether the view was updated. */ public function needsSortFieldIdentifierUpdate(ViewEntityInterface $view): bool { return $this->processDisplayHandlers($view, TRUE, function (array &$handler, string $handler_type): bool { return $this->processSortFieldIdentifierUpdateHandler($handler, $handler_type); }); } /** * Add lazy load options to all image type field configurations. * Loading Loading @@ -232,23 +214,4 @@ protected function processImageLazyLoadFieldHandler(array &$handler, string $han return $changed; } /** * Processes sort handlers by adding the sort identifier. * * @param array $handler * A display handler. * @param string $handler_type * The handler type. * * @return bool * Whether the handler was updated. */ protected function processSortFieldIdentifierUpdateHandler(array &$handler, string $handler_type): bool { if ($handler_type === 'sort' && !isset($handler['expose']['field_identifier'])) { $handler['expose']['field_identifier'] = $handler['id']; return TRUE; } return FALSE; } }
core/modules/views/tests/modules/views_test_config/test_views/views.view.test_exposed_form_sort_items_per_page.yml +1 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ display: order: asc expose: label: 'id' field_identifier: id exposed: true plugin_id: standard display_plugin: default Loading