You are here

function hook_path_alias_types in Pathauto 7

Same name and namespace in other branches
  1. 6.2 pathauto.api.php \hook_path_alias_types()
  2. 6 pathauto.api.php \hook_path_alias_types()

Used primarily by the bulk delete form. This hooks provides pathauto the information needed to bulk delete aliases created by your module. The keys of the return array are used by pathauto as the system path prefix to delete from the url_aliases table. The corresponding value is simply used as the label for each type of path on the bulk delete form.

Return value

An array whose keys match the beginning of the source paths (e.g.: "node/", "user/", etc.) and whose values describe the type of page (e.g.: "Content", "Users"). Like all displayed strings, these descriptions should be localized with t(). Use % to match interior pieces of a path, like "user/%/track". This is a database wildcard (meaning "user/%/track" matches "user/1/track" as well as "user/1/view/track").

5 functions implement hook_path_alias_types()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

blog_path_alias_types in ./pathauto.module
Implements hook_path_alias_types() on behalf of blog module.
forum_path_alias_types in ./pathauto.module
Implements hook_path_alias_types() on behalf of forum module.
node_path_alias_types in ./pathauto.module
Implements hook_path_alias_types() on behalf of node module.
taxonomy_path_alias_types in ./pathauto.module
Implements hook_path_alias_types() on behalf of taxonomy module.
user_path_alias_types in ./pathauto.module
Implements hook_path_alias_types() on behalf of user module.
2 invocations of hook_path_alias_types()
pathauto_admin_delete in ./pathauto.admin.inc
Menu callback; select certain alias types to delete.
pathauto_admin_delete_submit in ./pathauto.admin.inc
Process pathauto_admin_delete form submissions.

File

./pathauto.api.php, line 64
Documentation for pathauto API.

Code

function hook_path_alias_types() {
  $objects['user/'] = t('Users');
  $objects['node/'] = t('Content');
  return $objects;
}