You are here

function oa_notifications_is_notification_type in Open Atrium Notifications 7.2

Determine if this is an entity type which we need to provide notifications.

Parameters

object $node: The node object.

Return value

bool Returns TRUE if entity type requires providing notifications.

4 calls to oa_notifications_is_notification_type()
oa_notifications_form_node_form_alter in ./oa_notifications.module
Implements hook_form_node_form_alter().
oa_notifications_node_insert in ./oa_notifications.module
Implements hook_node_insert().
oa_notifications_node_update in ./oa_notifications.module
Implements hook_node_update().
_oa_notifications_can_comment in ./oa_notifications.module
Helper function to return true if comment form is enabled for the node

File

./oa_notifications.module, line 447

Code

function oa_notifications_is_notification_type($node) {

  // @TODO: Implement this as configurable. For now, add
  // notifications to any group-content type, and groups themselves.
  $types = oa_core_list_content_types(TRUE);

  // Default notifications on spaces.
  $types[OA_SPACE_TYPE] = TRUE;

  // No notifications on teams.
  unset($types[OA_TEAM_TYPE]);
  drupal_alter('is_notification_type', $types);
  return array_key_exists($node->type, $types);
}