Go to the source code of this file.
Functions | |
drupal_init_path () | |
drupal_lookup_path ($action, $path= '', $path_language= '') | |
drupal_get_path_alias ($path, $path_language= '') | |
drupal_get_normal_path ($path, $path_language= '') | |
arg ($index=NULL, $path=NULL) | |
drupal_get_title () | |
drupal_set_title ($title=NULL) | |
drupal_is_front_page () | |
drupal_match_path ($path, $patterns) |
These functions are not loaded for cached pages, but modules that need to use them in hook_init() or hook exit() can make them available, by executing "drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);".
Definition in file path.inc.
arg | ( | $ | index = NULL , |
|
$ | path = NULL | |||
) |
Return a component of the current Drupal path.
When viewing a page at the path "admin/build/types", for example, arg(0) would return "admin", arg(1) would return "content", and arg(2) would return "types".
Avoid use of this function where possible, as resulting code is hard to read. Instead, attempt to use named arguments in menu callback functions. See the explanation in menu.inc for how to construct callbacks that take arguments.
$index | The index of the component, where each component is separated by a '/' (forward-slash), and where the first component has an index of 0 (zero). |
Definition at line 154 of file path.inc.
Referenced by aggregator_form_category_submit(), aggregator_form_feed_submit(), aggregator_page_category(), aggregator_page_last(), aggregator_page_rss(), aggregator_page_source(), block_admin_display_form(), comment_admin(), filter_admin_delete(), filter_tips_long(), menu_get_active_help(), menu_get_item(), menu_local_tasks(), menu_set_active_trail(), openid_user_add_validate(), profile_field_form(), statistics_node_tracker(), statistics_user_tracker(), system_ip_blocking_form(), template_preprocess_page(), and user_admin_role().
drupal_get_normal_path | ( | $ | path, | |
$ | path_language = '' | |||
) |
Given a path alias, return the internal path it represents.
$path | A Drupal path alias. | |
$path_language | An optional language code to look up the path in. |
Definition at line 123 of file path.inc.
References $result, and drupal_lookup_path().
Referenced by _menu_site_is_offline(), drupal_access_denied(), drupal_init_path(), drupal_is_front_page(), drupal_not_found(), menu_edit_item_validate(), and system_site_information_settings_validate().
drupal_get_path_alias | ( | $ | path, | |
$ | path_language = '' | |||
) |
Given an internal Drupal path, return the alias set by the administrator.
$path | An internal Drupal path. | |
$path_language | An optional language code to look up the path in. |
Definition at line 103 of file path.inc.
References $result, and drupal_lookup_path().
Referenced by url().
drupal_get_title | ( | ) |
Get the title of the current page, for display on the page and in the title bar.
Definition at line 177 of file path.inc.
References $title, check_plain(), drupal_set_title(), and menu_get_active_title().
Referenced by template_preprocess_maintenance_page(), and template_preprocess_page().
drupal_init_path | ( | ) |
Initialize the $_GET['q'] variable to the proper normal path.
Definition at line 16 of file path.inc.
References drupal_get_normal_path(), and variable_get().
Referenced by _drupal_bootstrap().
drupal_is_front_page | ( | ) |
Check if the current page is the front page.
Definition at line 213 of file path.inc.
References drupal_get_normal_path(), and variable_get().
Referenced by l(), menu_get_active_breadcrumb(), menu_set_active_trail(), menu_tree_page_data(), template_preprocess(), template_preprocess_page(), and theme_links().
drupal_lookup_path | ( | $ | action, | |
$ | path = '' , |
|||
$ | path_language = '' | |||
) |
Given an alias, return its Drupal system URL if one exists. Given a Drupal system URL return one of its aliases if such a one exists. Otherwise, return FALSE.
$action | One of the following values:
| |
$path | The path to investigate for corresponding aliases or system URLs. | |
$path_language | Optional language code to search the path with. Defaults to the page language. If there's no path defined for that language it will search paths without language. |
Definition at line 46 of file path.inc.
References db_query(), db_result(), and module_exists().
Referenced by drupal_clear_path_cache(), drupal_get_normal_path(), and drupal_get_path_alias().
drupal_match_path | ( | $ | path, | |
$ | patterns | |||
) |
Check if a path matches any pattern in a set of patterns.
$path | The path to match. | |
$patterns | String containing a set of patterns separated by , or . |
Definition at line 230 of file path.inc.
References variable_get().
drupal_set_title | ( | $ | title = NULL |
) |
Set the title of the current page, for display on the page and in the title bar.
$title | Optional string value to assign to the page title; or if set to NULL (default), leaves the current title unchanged. |
Definition at line 198 of file path.inc.
References $title.
Referenced by _batch_do(), _batch_progress_page_js(), _batch_progress_page_nojs(), _db_error_page(), aggregator_page_source(), block_admin_configure(), blog_page_user(), book_admin_edit(), book_outline(), contact_user_page(), drupal_access_denied(), drupal_get_title(), drupal_not_found(), drupal_site_offline(), filter_admin_configure_page(), filter_admin_format_page(), filter_admin_order_page(), forum_overview(), help_page(), install_already_done_error(), install_change_settings(), install_main(), install_no_profile_error(), install_select_locale(), install_select_profile(), install_tasks(), node_add(), node_page_edit(), node_preview(), node_revision_overview(), openid_user_identities(), path_admin_edit(), poll_results(), poll_votes(), profile_browse(), profile_field_form(), statistics_node_tracker(), statistics_top_pages(), statistics_top_referrers(), statistics_top_visitors(), statistics_user_tracker(), taxonomy_add_term_page(), taxonomy_overview_terms(), taxonomy_term_page(), tracker_page(), translation_node_overview(), update_access_denied_page(), update_info_page(), update_results_page(), update_selection_page(), user_edit(), and user_view().