Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/system/tests/fixtures/update/drupal-8.views-entity-views-data-2846614.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Contains database additions to drupal-8.bare.standard.php.gz for testing the | |
6 * upgrade path of https://www.drupal.org/node/2455125. | |
7 */ | |
8 | |
9 use Drupal\Core\Database\Database; | |
10 use Drupal\Core\Serialization\Yaml; | |
11 | |
12 $connection = Database::getConnection(); | |
13 | |
14 // Structure of a view with timestamp fields. | |
15 $views_configs = []; | |
16 | |
17 $views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/drupal-8.views-entity-views-data-2846614.yml')); | |
18 | |
19 foreach ($views_configs as $views_config) { | |
20 $connection->insert('config') | |
21 ->fields([ | |
22 'collection', | |
23 'name', | |
24 'data', | |
25 ]) | |
26 ->values([ | |
27 'collection' => '', | |
28 'name' => 'views.view.' . $views_config['id'], | |
29 'data' => serialize($views_config), | |
30 ]) | |
31 ->execute(); | |
32 } |