You are here

function content_access_rules_rules_event_info in Content Access 7

Implements hook_rules_event_info().

File

content_access_rules/content_access_rules.rules.inc, line 18
Rules specific functions that expose content_access' API.

Code

function content_access_rules_rules_event_info() {
  $events['content_access_content_type'] = array(
    'label' => t('Content type access control was changed'),
  );
  $events['content_access_per_node'] = array(
    'label' => t('Per node access control was changed'),
    'variables' => array(
      'node' => array(
        'type' => 'node',
        'label' => 'Content with updated content access',
      ),
    ),
  );
  if (module_exists('acl')) {
    $events['content_access_user_acl'] = array(
      'label' => t('User was added to ACL'),
    );
  }
  $items = array();
  foreach ($events as $name => $event) {
    $items[$name] = $event + array(
      'group' => t('Content Access'),
    );
  }
  return $items;
}