Skip to content

Instantly share code, notes, and snippets.

View nonsie's full-sized avatar

Katrin Valdre nonsie

  • Portland, OR
View GitHub Profile
@nonsie
nonsie / import.php
Created February 19, 2019 19:51 — forked from crittermike/import.php
Importing Drupal 8 config programmatically
<?php
// Import arbitrary config from a variable.
$config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html');
$config->setData($data)->save();
// Or, re-import the default config for a module or profile, etc.
\Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module');
// Or, import YAML config an arbitrary directory.
@nonsie
nonsie / README.md
Created January 25, 2016 21:32 — forked from signalpoint/README.md
AngularJS Autocomplete with Drupal 8