You are here

function pm_page_front in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 includes/pm.pages.inc \pm_page_front()

Page callback for 'pm' path.

1 string reference to 'pm_page_front'
pm_menu in ./pm.module
Implements hook_menu().

File

includes/pm.pages.inc, line 10
Provides various pages for pm module.

Code

function pm_page_front() {
  $link_blocks = pm_dashboard_get_links(TRUE, 'page');
  if (!empty($link_blocks)) {

    // Divide links into two blocks.
    $count = ceil(count($link_blocks) / 2);
    $link_blocks = array_chunk($link_blocks, $count);
  }
  return array(
    'quick_links' => array(
      '#theme' => 'pm_dashboard',
      '#links' => $link_blocks,
      '#attached' => array(
        'css' => array(
          drupal_get_path('module', 'pm') . '/pm-dashboard.css',
        ),
      ),
    ),
  );
}