You are here

function pm_block_view in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pm.module \pm_block_view()
  2. 7 pm.module \pm_block_view()
  3. 7.2 pm.module \pm_block_view()

Implements hook_block_view().

File

./pm.module, line 331
Main module file for the Project Management module.

Code

function pm_block_view($delta = '') {

  // Define Project Management menu block.
  $block = array();
  switch ($delta) {
    case 'pm_menu':
      $block = array(
        'subject' => 'Project Management Menu',
        'content' => array(
          'quick_links' => array(
            '#theme' => 'pm_dashboard_block',
            '#links' => pm_dashboard_get_links(TRUE, 'block'),
            '#attached' => array(
              'css' => array(
                drupal_get_path('module', 'pm') . '/pm-dashboard.css',
              ),
            ),
          ),
        ),
      );
      break;
  }
  return $block;
}