drupal-8.views_block_content-2976334.php 639 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @file
  4. * Contains database additions to drupal-8.bare.standard.php.gz for testing the
  5. * upgrade path of https://www.drupal.org/project/drupal/issues/2976334.
  6. */
  7. use Drupal\Core\Database\Database;
  8. use Drupal\Core\Serialization\Yaml;
  9. $connection = Database::getConnection();
  10. // Override configuration for 'block_content' View with extra display with with
  11. // overridden filters.
  12. $config = Yaml::decode(file_get_contents(__DIR__ . '/views.view.block_content_2976334.yml'));
  13. $connection->update('config')
  14. ->fields([
  15. 'data' => serialize($config),
  16. ])
  17. ->condition('name', 'views.view.' . $config['id'])
  18. ->execute();