Created
May 15, 2012 17:53
-
-
Save robballou/2703698 to your computer and use it in GitHub Desktop.
Custom Module basic block hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_block_info | |
*/ | |
function custom_module_block_info() { | |
$blocks['custom_module_my_block'] = array( | |
'info' => t('My block'), | |
'cache' => DRUPAL_CACHE_PER_PAGE, | |
); | |
return $blocks; | |
} | |
/** | |
* Implements hook_block_view | |
* | |
* Passes off the function call to _custom_module_view_DELTA | |
*/ | |
function custom_module_block_view($delta = '') { | |
// our block code... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment