You are here

live_css.install in Live CSS 8.2

Same filename and directory in other branches
  1. 8 live_css.install
  2. 7.2 live_css.install

Installation functions for Live CSS module.

File

live_css.install
View source
<?php

/**
 * @file
 * Installation functions for Live CSS module.
 */

/**
 * Implements hook_install().
 *   - Set variables to default values when installed.
 */
function live_css_install() {
  $new = config('live_css.settings');
  $new
    ->set('live_css_less', 1);
  $new
    ->set('live_css_hideadmin', 1);
  $new
    ->set('live_css_hidemodules', 0);
  $new
    ->set('live_css_storage', 1);
  $new
    ->set('live_css_theme', 'vibrant_ink');
  $new
    ->set('live_css_fontsize', '12px');
  $new
    ->set('live_css_softtabs', 1);
  $new
    ->set('live_css_tabsize', 2);
  $new
    ->set('live_css_flush', FALSE);
  $new
    ->save();
}

/**
 * Implements hook_uninstall().
 */
function live_css_uninstall() {
  $cfg = config('live_css.settings');
  $cfg
    ->clear('live_css_less');
  $cfg
    ->clear('live_css_theme');
  $cfg
    ->clear('live_css_hideadmin');
  $cfg
    ->clear('live_css_hidemodules');
  $cfg
    ->clear('live_css_fontsize');
  $cfg
    ->clear('live_css_tabsize');
  $cfg
    ->clear('live_css_softtabs');
  $cfg
    ->clear('live_css_storage');
  $cfg
    ->clear('live_css_flush');
}

Functions

Namesort descending Description
live_css_install Implements hook_install().
live_css_uninstall Implements hook_uninstall().