Loading core/modules/block/block.post_update.php +14 −0 Changes for core/modules/block/block.post_update.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -18,3 +18,17 @@ function block_removed_post_updates(): array { 'block_post_update_set_menu_block_depth_to_null_if_zero' => '12.0.0', ]; } /** * Delete blocks placed using the removed Syndicate block plugin. */ function block_post_update_remove_syndicate_blocks(): void { $storage = \Drupal::entityTypeManager()->getStorage('block'); $blocks = $storage->loadByProperties([ 'plugin' => 'node_syndicate_block', 'settings.provider' => 'node', ]); if ($blocks) { $storage->delete($blocks); } } core/modules/block/tests/fixtures/update/block.block.olivero_syndicate.yml 0 → 100644 +21 −0 Changes for core/modules/block/tests/fixtures/update/block.block.olivero_syndicate.yml: 21 added lines, 0 removed lines. Original line number Diff line number Diff line uuid: 2d261b9c-8257-4319-9f40-562cee6f6877 langcode: en status: true dependencies: module: - node theme: - olivero id: olivero_syndicate theme: olivero region: social weight: 0 provider: null plugin: node_syndicate_block settings: id: node_syndicate_block label: 'RSS feed' label_display: '0' provider: node block_count: 10 visibility: { } core/modules/block/tests/fixtures/update/block.block.stark_custom_syndicate.yml 0 → 100644 +20 −0 Changes for core/modules/block/tests/fixtures/update/block.block.stark_custom_syndicate.yml: 20 added lines, 0 removed lines. Original line number Diff line number Diff line uuid: 5a8e2f41-9c3d-4e7b-a1f6-3d2c8b9e0f57 langcode: en status: true dependencies: module: - custom_syndicate theme: - stark id: stark_custom_syndicate theme: stark region: content weight: 0 provider: null plugin: node_syndicate_block settings: id: node_syndicate_block label: 'RSS feed' label_display: '0' provider: custom_syndicate visibility: { } core/modules/block/tests/fixtures/update/block.block.stark_syndicate.yml 0 → 100644 +21 −0 Changes for core/modules/block/tests/fixtures/update/block.block.stark_syndicate.yml: 21 added lines, 0 removed lines. Original line number Diff line number Diff line uuid: 0f6d1c6a-3b1e-4b55-8f0e-6a9f2e7c4d21 langcode: en status: true dependencies: module: - node theme: - stark id: stark_syndicate theme: stark region: content weight: 0 provider: null plugin: node_syndicate_block settings: id: node_syndicate_block label: 'RSS feed' label_display: '0' provider: node block_count: 10 visibility: { } core/modules/block/tests/fixtures/update/syndicate-block-config.php 0 → 100644 +21 −0 Changes for core/modules/block/tests/fixtures/update/syndicate-block-config.php: 21 added lines, 0 removed lines. Original line number Diff line number Diff line <?php /** * @file * Test fixture. */ use Drupal\Core\Database\Database; use Drupal\Component\Serialization\Yaml; $connection = Database::getConnection(); foreach (['olivero_syndicate', 'stark_syndicate', 'stark_custom_syndicate'] as $id) { $connection->insert('config') ->fields([ 'collection' => '', 'name' => "block.block.$id", 'data' => serialize(Yaml::decode(file_get_contents("core/modules/block/tests/fixtures/update/block.block.$id.yml"))), ]) ->execute(); } Loading
core/modules/block/block.post_update.php +14 −0 Changes for core/modules/block/block.post_update.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -18,3 +18,17 @@ function block_removed_post_updates(): array { 'block_post_update_set_menu_block_depth_to_null_if_zero' => '12.0.0', ]; } /** * Delete blocks placed using the removed Syndicate block plugin. */ function block_post_update_remove_syndicate_blocks(): void { $storage = \Drupal::entityTypeManager()->getStorage('block'); $blocks = $storage->loadByProperties([ 'plugin' => 'node_syndicate_block', 'settings.provider' => 'node', ]); if ($blocks) { $storage->delete($blocks); } }
core/modules/block/tests/fixtures/update/block.block.olivero_syndicate.yml 0 → 100644 +21 −0 Changes for core/modules/block/tests/fixtures/update/block.block.olivero_syndicate.yml: 21 added lines, 0 removed lines. Original line number Diff line number Diff line uuid: 2d261b9c-8257-4319-9f40-562cee6f6877 langcode: en status: true dependencies: module: - node theme: - olivero id: olivero_syndicate theme: olivero region: social weight: 0 provider: null plugin: node_syndicate_block settings: id: node_syndicate_block label: 'RSS feed' label_display: '0' provider: node block_count: 10 visibility: { }
core/modules/block/tests/fixtures/update/block.block.stark_custom_syndicate.yml 0 → 100644 +20 −0 Changes for core/modules/block/tests/fixtures/update/block.block.stark_custom_syndicate.yml: 20 added lines, 0 removed lines. Original line number Diff line number Diff line uuid: 5a8e2f41-9c3d-4e7b-a1f6-3d2c8b9e0f57 langcode: en status: true dependencies: module: - custom_syndicate theme: - stark id: stark_custom_syndicate theme: stark region: content weight: 0 provider: null plugin: node_syndicate_block settings: id: node_syndicate_block label: 'RSS feed' label_display: '0' provider: custom_syndicate visibility: { }
core/modules/block/tests/fixtures/update/block.block.stark_syndicate.yml 0 → 100644 +21 −0 Changes for core/modules/block/tests/fixtures/update/block.block.stark_syndicate.yml: 21 added lines, 0 removed lines. Original line number Diff line number Diff line uuid: 0f6d1c6a-3b1e-4b55-8f0e-6a9f2e7c4d21 langcode: en status: true dependencies: module: - node theme: - stark id: stark_syndicate theme: stark region: content weight: 0 provider: null plugin: node_syndicate_block settings: id: node_syndicate_block label: 'RSS feed' label_display: '0' provider: node block_count: 10 visibility: { }
core/modules/block/tests/fixtures/update/syndicate-block-config.php 0 → 100644 +21 −0 Changes for core/modules/block/tests/fixtures/update/syndicate-block-config.php: 21 added lines, 0 removed lines. Original line number Diff line number Diff line <?php /** * @file * Test fixture. */ use Drupal\Core\Database\Database; use Drupal\Component\Serialization\Yaml; $connection = Database::getConnection(); foreach (['olivero_syndicate', 'stark_syndicate', 'stark_custom_syndicate'] as $id) { $connection->insert('config') ->fields([ 'collection' => '', 'name' => "block.block.$id", 'data' => serialize(Yaml::decode(file_get_contents("core/modules/block/tests/fixtures/update/block.block.$id.yml"))), ]) ->execute(); }