You are here

function node_limit_og_node_limit_applies_in_context in Node Limit 6

@file Module to restrict the number of nodes within an organic group.

Implementation of hook_node_limit_applies_in_context().

File

node_limit_og/node_limit_og.module, line 10
Module to restrict the number of nodes within an organic group.

Code

function node_limit_og_node_limit_applies_in_context($lid, $node, $user) {

  //TODO

  //return DOES_APPLY iff the $node is being created in this limit's group

  //return NEUTRAL iff the $node is for an OG, but not this OG

  //return DOESNT_APPLY iff the $node is not for an OG
  $limit = node_limit_og_node_limit_load($lid);
  if (empty($limit)) {
    return NODE_LIMIT_LIMIT_NEUTRAL;
  }
  return array(
    'node_limit_og' => NODE_LIMIT_LIMIT_DOES_APPLY,
  );
}