Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <?php
  2. function my_module_block_info() {
  3. $blocks = array();
  4.  
  5. $blocks['my_module_config'] = array(
  6. 'info' => t('My Module'),
  7. );
  8. return $blocks;
  9. }
  10.  
  11.  
  12. /**
  13. * Implements hook_block_view().
  14. */
  15. function my_module_block_view($delta = '') {
  16. $block = array();
  17.  
  18. switch ($delta) {
  19. case 'my_module_config':
  20. $my_module_form = drupal_get_form('my_module_form');
  21. $my_module_form = drupal_render($my_module_form);
  22. $block['subject'] = '';
  23. $block['content'] = $my_module_form;
  24. break;
  25. }
  26. return $block;
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement