You are here

function shortcut_patterns in Patterns 7.2

Same name and namespace in other branches
  1. 7 patterns_components/components/shortcut.inc \shortcut_patterns()

Implements hook_patterns().

1 call to shortcut_patterns()
shortcut_patterns_callbacks in patterns_components/components/shortcut.inc
hook_patterns_callbacks()

File

patterns_components/components/shortcut.inc, line 28
Patterns component for shortcut.

Code

function shortcut_patterns($data = NULL) {
  $files = array(
    'modules/shortcut/shortcut.admin.inc',
  );
  $actions['shortcut_set'] = array(
    PATTERNS_INFO => t('create/delete/modify shortcut set'),
    PATTERNS_CREATE => array(
      'shortcut_set_add_form',
    ),
    PATTERNS_MODIFY => array(
      'shortcut_set_edit_form',
    ),
    PATTERNS_DELETE => array(
      'shortcut_set_delete_form',
    ),
    PATTERNS_FILES => $files,
    PATTERNS_EXPORT => array(
      PATTERNS_EXPORT_ALL => 'shortcut_patterns_export_all_set',
    ),
  );
  $actions['shortcut_link'] = array(
    PATTERNS_INFO => t('add a new link to one shortcut_set'),
    PATTERNS_CREATE => array(
      'shortcut_link_add',
    ),
    PATTERNS_MODIFY => array(
      'shortcut_link_edit',
    ),
    PATTERNS_DELETE => array(
      'shortcut_link_delete',
    ),
    PATTERNS_FILES => $files,
    PATTERNS_EXPORT => array(
      PATTERNS_EXPORT_ALL => 'shortcut_patterns_export_all_link',
    ),
  );
  $actions['shortcut_set_user'] = array(
    PATTERNS_INFO => t('one user get one shortcut_set'),
    PATTERNS_MODIFY => array(
      'shortcut_set_switch',
    ),
    PATTERNS_FILES => $files,
    PATTERNS_EXPORT => array(
      PATTERNS_EXPORT_ALL => 'shortcut_patterns_export_all_user_set',
    ),
  );
  return $actions;
}