You are here

juicerio.install in Juicer - Social Media Feed Aggregator 8

Same filename and directory in other branches
  1. 7 juicerio.install

Contains Drupal\juicerio\juicerio.install.

File

juicerio.install
View source
<?php

/**
 * @file
 * Contains Drupal\juicerio\juicerio.install.
 */

/**
 * Implements hook_uninstall().
 *
 * Remove the values that we have saved in configuration.
 */
function juicerio_uninstall() {
  \Drupal::configFactory()
    ->getEditable('juicerio.settings')
    ->delete();
}

/**
 * Implements hook_update_N().
 *
 * Renames settings config to correct key.
 */
function juicerio_update_8001() {
  \Drupal::configFactory()
    ->rename('juicer.settings', 'juicerio.settings');
}

/**
 * Due to support alternate libraries, add in the default Javascript embed.
 */
function juicerio_update_8002() {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('juicerio.settings');
  $config
    ->set('juicer_js_embed', 'juicerio.embed_no_jquery');
  $config
    ->save(TRUE);
}

Functions

Namesort descending Description
juicerio_uninstall Implements hook_uninstall().
juicerio_update_8001 Implements hook_update_N().
juicerio_update_8002 Due to support alternate libraries, add in the default Javascript embed.