You are here

function _signup_needs_output in Signup 7

Same name and namespace in other branches
  1. 5.2 signup.module \_signup_needs_output()
  2. 6.2 signup.module \_signup_needs_output()
  3. 6 signup.module \_signup_needs_output()

Helper function that determines if a given node should have any signup-related output.

Parameters

stdClass $node: A fully loaded node object.

Return value

bool TRUE if this node should have signup output, FALSE if not.

See also

signup_nodeapi()

3 calls to _signup_needs_output()
signup_handler_field_signup_node_link::check_access in views/handlers/signup_handler_field_signup_node_link.inc
signup_node_view in ./signup.module
Implements hook_node_view().
_signup_menu_access in ./signup.module
Determine menu access for a given type of signup menu item.

File

./signup.module, line 938
The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…

Code

function _signup_needs_output($node) {
  if (empty($node->signup)) {

    // Not signup enabled at all.
    return FALSE;
  }
  $suppress = module_invoke_all('signup_suppress', $node);
  if (in_array(TRUE, $suppress)) {

    // Someone doesn't want signup details printed.
    return FALSE;
  }
  return TRUE;
}