You are here

function user_patterns in Patterns 7

Same name and namespace in other branches
  1. 5 components/user.inc \user_patterns()
  2. 6.2 components/user.inc \user_patterns()
  3. 6 components/user.inc \user_patterns()
  4. 7.2 patterns_components/components/user.inc \user_patterns()

Implements hook_patterns() for the user module.

File

patterns_components/components/user.inc, line 12

Code

function user_patterns($data) {
  $files = array(
    'modules/user/user.admin.inc',
    'modules/user/user.pages.inc',
  );
  $actions['user'] = array(
    PATTERNS_INFO => t('Create/Modify/Delete Users'),
    PATTERNS_CREATE => array(
      'user_register_form',
    ),
    PATTERNS_MODIFY => array(
      'user_profile_form',
    ),
    PATTERNS_DELETE => array(
      'user_cancel_confirm_form',
    ),
    PATTERNS_FILES => $files,
  );
  $actions['role'] = array(
    PATTERNS_INFO => t('Create/Modify/Delete Roles'),
    PATTERNS_CREATE => array(
      'user_admin_roles',
    ),
    PATTERNS_MODIFY => array(
      'user_admin_role',
    ),
    PATTERNS_DELETE => array(
      'user_admin_role_delete_confirm',
    ),
    PATTERNS_FILES => $files,
    PATTERNS_EXPORT => array(
      PATTERNS_EXPORT_ALL => 'user_patterns_export_all_roles',
    ),
  );
  $actions['permission'] = array(
    PATTERNS_INFO => t('Create/Modify/Delete Permissions'),
    PATTERNS_CREATE => array(
      'user_admin_permissions',
    ),
    PATTERNS_MODIFY => array(
      'user_admin_permissions',
    ),
    PATTERNS_DELETE => array(
      'user_admin_permissions',
    ),
    PATTERNS_FILES => $files,
    PATTERNS_EXPORT => array(
      PATTERNS_EXPORT_ALL => 'user_patterns_export_all_permissions',
    ),
  );
  return $actions;
}