2010-02-28 17:28:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Provide test blocks.
|
|
|
|
*/
|
|
|
|
|
2011-12-03 23:43:50 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
2010-02-28 17:28:38 +00:00
|
|
|
/**
|
|
|
|
* Implements hook_block_info().
|
|
|
|
*/
|
|
|
|
function block_test_block_info() {
|
|
|
|
$blocks['test_cache'] = array(
|
|
|
|
'info' => t('Test block caching'),
|
2010-06-15 16:19:28 +00:00
|
|
|
'cache' => variable_get('block_test_caching', DRUPAL_CACHE_PER_ROLE),
|
2010-02-28 17:28:38 +00:00
|
|
|
);
|
2010-04-26 14:10:40 +00:00
|
|
|
|
|
|
|
$blocks['test_html_id'] = array(
|
|
|
|
'info' => t('Test block html id'),
|
|
|
|
);
|
2010-02-28 17:28:38 +00:00
|
|
|
return $blocks;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_block_view().
|
|
|
|
*/
|
|
|
|
function block_test_block_view($delta = 0) {
|
|
|
|
return array('content' => variable_get('block_test_content', ''));
|
|
|
|
}
|