You are here

function entity_rules_events_variables in Entity API 7

Returns some parameter info suiting for the specified entity type.

1 call to entity_rules_events_variables()
EntityDefaultRulesController::eventInfo in ./entity.rules.inc

File

./entity.rules.inc, line 75
Provides Rules integration for entities provided via the CRUD API.

Code

function entity_rules_events_variables($type, $label, $update = FALSE) {
  $args = array(
    $type => array(
      'type' => $type,
      'label' => $label,
    ),
  );
  if ($update) {
    $args += array(
      $type . '_unchanged' => array(
        'type' => $type,
        'label' => t('unchanged entity'),
        'handler' => 'rules_events_entity_unchanged',
      ),
    );
  }
  return $args;
}