You are here

function theme_pm_dashboard_block in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pm.theme.inc \theme_pm_dashboard_block()
  2. 7 pm.theme.inc \theme_pm_dashboard_block()
  3. 7.2 pm.theme.inc \theme_pm_dashboard_block()

Provides HTML for the Project Management dashboard blocks.

1 theme call to theme_pm_dashboard_block()
pm_block_view in ./pm.module
Implements hook_block_view().

File

./pm.theme.inc, line 42
Provides theme functions for Project Management modules.

Code

function theme_pm_dashboard_block($vars) {
  $link_blocks = $vars['links'];
  $content = '<div id="pmdashboard-block">';
  if (!empty($link_blocks)) {
    foreach ($link_blocks as $link_array) {
      if (!empty($link_array['theme'])) {
        $content .= theme($link_array['theme'], array(
          'link_blocks' => $link_array,
        ));
      }
      else {
        $content .= theme('pm_dashboard_link', array(
          'link_blocks' => $link_array,
        ));
      }
    }
  }
  else {

    // No links, hide block.
    return '';
  }
  $content .= '</div>';
  return $content;
}