You are here

sassy.install in Sassy 7.3

Same filename and directory in other branches
  1. 7 sassy.install
  2. 7.2 sassy.install

Install, update and uninstall functions for the SASSY module.

File

sassy.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the SASSY module.
 */

/**
 * Implementation of hook_uninstall().
 */
function sassy_uninstall() {
  variable_del('sassy_cache');
  variable_del('sassy_devel');

  // Delete the folder for the SCSS / SASS cache.
  file_unmanaged_delete_recursive('public://sassy');
}

/**
 * Implementation of hook_requirements().
 */
function sassy_requirements($phase) {
  $t = get_t();
  if ($phase == 'install') {
    $requirements = array();
    $libraries = libraries_get_libraries();
    if (isset($libraries['phamlp'])) {
      $requirements['phamlp']['value'] = $t('PHamlP is installed.');
      $requirements['phamlp']['severity'] = REQUIREMENT_OK;
    }
    else {
      $requirements['phamlp']['value'] = $t('PHamlP is not installed.');
      $requirements['phamlp']['severity'] = REQUIREMENT_ERROR;
      $requirements['phamlp']['description'] = $t('Please download the PHamlP library from %github and place it in the sites/all/libraries directory.', array(
        '%github' => 'https://github.com/richthegeek/phamlp',
      ));
    }
  }
  return $requirements;
}

Functions

Namesort descending Description
sassy_requirements Implementation of hook_requirements().
sassy_uninstall Implementation of hook_uninstall().