You are here

function spaces_dashboard_block_view in Spaces 7

Same name and namespace in other branches
  1. 7.3 spaces_dashboard/spaces_dashboard.module \spaces_dashboard_block_view()

Implements hook_block_view().

File

spaces_dashboard/spaces_dashboard.module, line 288

Code

function spaces_dashboard_block_view($delta) {
  if ($delta == 'editor') {

    // Ensure that the dashboard editor does not appear on the same page as
    // the context editor. The two will collide.
    $editor = FALSE;
    $context = context_get('spaces', 'dashboard') ? context_get('context', context_get('spaces', 'dashboard')) : FALSE;
    if (spaces_dashboard_access('admin') && $context) {
      return array(
        'subject' => t('Dashboard'),
        'content' => drupal_get_form('spaces_dashboard_editor', array(
          $context,
        )),
      );
    }
  }
}