/ Published in: PHP
URL: http://api.lullabot.com/hook_block/6
Expand |
Embed | Plain Text
if ($op == 'list') { 'weight' => 0, 'status' => 1, 'region' => 'left'); // BLOCK_CACHE_PER_ROLE will be assumed for block 0. 'cache' => BLOCK_CACHE_PER_ROLE | BLOCK_CACHE_PER_PAGE); return $blocks; } else if ($op == 'configure' && $delta == 0) { '#type' => 'select', '#title' => t('Number of items'), '#default_value' => variable_get('mymodule_block_items', 0), ); return $form; } else if ($op == 'save' && $delta == 0) { variable_set('mymodule_block_items', $edit['items']); } else if ($op == 'view') { switch($delta) { case 0: 'content' => mymodule_display_block_1()); break; case 1: 'content' => mymodule_display_block_2()); break; } return $block; } }
You need to login to post a comment.
