You are here

function spaces_node_links in Spaces 5.2

Generates a set of links for node types associated with the current active contexts.

4 calls to spaces_node_links()
spaces_core_documents in spaces_core/spaces_core.module
spaces_dashboard_group_dashboard in spaces_dashboard/spaces_dashboard.module
Implements a group dashboard for users in multiple groups TODO: implement "fires" listing
_spaces_block_tools in ./spaces.module
Contextual tools
_spaces_views_empty in ./spaces_views.inc
Function that handles a variety of tasks needed when view is empty

File

./spaces.module, line 1241

Code

function spaces_node_links() {
  $output = '';
  $links = _context_ui_node_links();

  // Perform additional logic if a spaces feature is active.
  if ($feature = context_get('spaces', 'feature')) {
    $space = spaces_get_space();

    // Feature is inaccessible
    if ($space && !$space
      ->feature_access($feature)) {
      $features = spaces_features($space->type);
      if (isset($features[$feature]->node)) {
        foreach ($features[$feature]->node as $type) {
          unset($links[$type]);
        }
      }
    }
  }
  foreach (module_implements('spaces_node_links_alter') as $module) {

    // It would be best to use_call_user_func(), but this makes most
    // sense passed by reference...
    $function = $module . '_spaces_node_links_alter';
    $function($links);
  }
  return theme('spaces_node_links', $links);
}