d3_sankey_examples.install 1.19 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<?php

/**
 * @file
 * Install, update, uninstall the d3_sankey_examples module.
 */

/**
 * Implements hook_requirements().
 */
function d3_sankey_examples_requirements($phase) {
  $requirements = array();
  $t = get_t();

  if ($phase === 'runtime') {
    // Remind users to disable this module on the live site.
    $requirements['d3_sankey_examples'] = array('title' => $t('D3 Sankey Examples module'));
    $requirements['d3_sankey_examples']['severity'] = REQUIREMENT_WARNING;
    $requirements['d3_sankey_examples']['value'] = $t('Publicly-visible example page at <a href="@link_href"><code>@link_text</code></a>!', array(
      '@link_href' => url('d3/examples/sankey'),
      '@link_text' => 'd3/examples/sankey',
    ));
    $requirements['d3_sankey_examples']['description'] = $t('The D3 Sankey Examples module is only intended to be used as a developer reference: you should disable it on any site that can be seen by the general public, because it defines an example page that has no access control!');
  }

  return $requirements;
}

/**
 * Installs d3_sankey_examples module.
 */
function d3_sankey_examples_update_7000(&$sandbox) {
  // Noop to ensure Drupal stores a schema version in the database.
}