You are here

api_tests.install in Lightning API 8

Same filename and directory in other branches
  1. 8.2 tests/modules/api_tests/api_tests.install

File

tests/modules/api_tests/api_tests.install
View 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

Namesort descending Description
api_tests_install Implements hook_install().
api_tests_uninstall Implements hook_uninstall().