You are here

function rabbit_hole_get_action_entity in Rabbit Hole 7.2

Gets the action for an entity.

Parameters

string $entity_type: The entity type of the entity.

object $entity: The entity that we're checking.

Return value

int The Rabbit Hole action set for the entity.

2 calls to rabbit_hole_get_action_entity()
rabbit_hole_execute in ./rabbit_hole.module
Determines the action that should be executed.
rabbit_hole_form in ./rabbit_hole.module
Form structure for the Rabbit Hole configuration.

File

./rabbit_hole.module, line 567
Main module file for Rabbit Hole.

Code

function rabbit_hole_get_action_entity($entity_type, $entity) {
  return isset($entity->rh_action) ? $entity->rh_action : RABBIT_HOLE_USE_DEFAULT;
}