api_tests.install in Lightning API 8
Same filename and directory in other branches
File
tests/modules/api_tests/api_tests.installView source
<?php
/**
* Implements hook_install().
*/
function api_tests_install() {
$config = \Drupal::configFactory()
->getEditable('lightning_api.settings');
\Drupal::state()
->set('api_tests', $config
->get());
$config
->set('entity_json', TRUE)
->save();
}
/**
* Implements hook_uninstall().
*/
function api_tests_uninstall() {
$state = \Drupal::state();
\Drupal::configFactory()
->getEditable('lightning_api.settings')
->setData($state
->get('api_tests'))
->save();
$state
->delete('api_tests');
}
Functions
Name | Description |
---|---|
api_tests_install | Implements hook_install(). |
api_tests_uninstall | Implements hook_uninstall(). |