This file contains hidden or 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 | |
// 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. |
This file contains hidden or 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
name: mautic | |
recipe: lamp | |
config: | |
webroot: . |
This file contains hidden or 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
class ApiConsumer | |
{ | |
// Other variables, methods declaration. | |
// Full code: https://github.com/mohit-rocks/HelloWorldBundle/blob/master/Connection/ApiConsumer.php | |
/** | |
* Fetch the data from API endpoint. | |
*/ | |
public function getSubscribers() | |
{ | |
$users = $this->client->get('v2/api/fetch-dummy-users'); |
OlderNewer