Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_block_view().
- *
- * Prepares the contents of the block.
- */
- $myvariable = 'test';
- function mymodule_subscribe_block_view($delta = '', $myvariable) {
- switch ($delta) {
- case 'mymodule_test':
- $block['subject'] = t('Test block');
- if (user_access('access content')) {
- // Pass data through theme function.
- $block['content'] = $myvariable;
- }
- return $block;
- }
- }
- function mymodule_subscribe_block_view($delta = '', $myvariable = 0) {
- switch ($delta) {
- case 'mymodule_test':
- $block['subject'] = t('Test block');
- if (user_access('access content')) {
- // Pass data through theme function.
- $block['content'] = $myvariable;
- }
- return $block;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement