File: block_test.module

package info (click to toggle)
drupal7 7.14-2%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 24,516 kB
  • sloc: php: 42,979; pascal: 39,064; sh: 1,622; xml: 441; makefile: 14; sql: 1
file content (36 lines) | stat: -rw-r--r-- 771 bytes parent folder | download
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
35
36
<?php

/**
 * @file
 *   Provide test blocks.
 */

/**
 * Implements hook_system_theme_info().
 */
function block_test_system_theme_info() {
  $themes['block_test_theme'] = drupal_get_path('module', 'block_test') . '/themes/block_test_theme/block_test_theme.info';
  return $themes;
}

/**
 * Implements hook_block_info().
 */
function block_test_block_info() {
  $blocks['test_cache'] = array(
    'info' => t('Test block caching'),
    'cache' => variable_get('block_test_caching', DRUPAL_CACHE_PER_ROLE),
  );

  $blocks['test_html_id'] = array(
    'info' => t('Test block html id'),
  );
  return $blocks;
}

/**
 * Implements hook_block_view().
 */
function block_test_block_view($delta = 0) {
  return array('content' => variable_get('block_test_content', ''));
}