Last active
July 3, 2017 16:40
-
-
Save jenitehan/66645a0630dc69965a2f06e87edb98d9 to your computer and use it in GitHub Desktop.
Load a Drupal 8 config, override some settings, save new config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This will load the view from config, set a new name and ID, then change the vocabulary to tags. | |
$config = \Drupal::configFactory()->getEditable('views.view.blog_categories'); | |
$config->setName('views.view.blog_categories_tags'); | |
$config->set('id', 'blog_categories_tags'); | |
$config->set('display.default.display_options.filters.vid.value', ['tags' => 'tags']); | |
$config->save(TRUE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment