arg
- Versions
- 5
arg($index)- 6 – 7
arg($index = NULL, $path = NULL)
Return a component of the current Drupal path.
When viewing a page at the path "admin/content/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.
Parameters
$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).
Return value
The component specified by $index, or FALSE if the specified component was not found.
▾ 220 functions call arg()
- aggregator_form_category_submit in core/modules/aggregator/aggregator.module
- Process aggregator_form_category form submissions. @todo Add delete confirmation dialog.
- aggregator_form_feed_submit in core/modules/aggregator/aggregator.module
- Process aggregator_form_feed form submissions. @todo Add delete confirmation dialog.
- aggregator_menu in core/modules/aggregator/aggregator.module
- Implementation of hook_menu().
- aggregator_page_category in core/modules/aggregator/aggregator.module
- Menu callback; displays all the items aggregated in a particular category.
- aggregator_page_last in core/modules/aggregator/aggregator.module
- Menu callback; displays the most recent items gathered from any feed.
- aggregator_page_rss in core/modules/aggregator/aggregator.module
- Menu callback; generate an RSS 0.92 feed of aggregator items or categories.
- aggregator_page_source in core/modules/aggregator/aggregator.module
- Menu callback; displays all the items captured from a particular feed.
- block_admin_display in core/modules/block/block.module
- Generate main block administration form.
- blogapi_blogapi in core/modules/blogapi/blogapi.module
- blog_link in core/modules/blog/blog.module
- Implementation of hook_link().
- book_admin_edit_submit in core/modules/book/book.module
- book_block in core/modules/book/book.module
- Implementation of hook_block().
- book_form in core/modules/book/book.module
- Implementation of hook_form().
- book_help in core/modules/book/book.module
- Implementation of hook_help().
- book_menu in core/modules/book/book.module
- Implementation of hook_menu().
- captcha_form_alter in contrib/captcha/captcha.module
- Implementation of hook_form_alter().
- captcha_menu in contrib/captcha/captcha.module
- Implementation of hook_menu().
- color_form_alter in core/modules/color/color.module
- Implementation of hook_form_alter().
- color_scheme_form in core/modules/color/color.module
- Form callback. Returns the configuration form.
- comment_admin in core/modules/comment/comment.module
- Menu callback; present an administrative comment listing.
- comment_menu in core/modules/comment/comment.module
- Implementation of hook_menu().
- comment_node_url in core/modules/comment/comment.module
- comment_render in core/modules/comment/comment.module
- Renders comment(s).
- contact_admin_delete_submit in core/modules/contact/contact.module
- Process category delete form submission.
- contact_admin_edit in core/modules/contact/contact.module
- Category edit page.
- contact_admin_edit_submit in core/modules/contact/contact.module
- Process the contact category edit page form submission.
- contact_mail_user_submit in core/modules/contact/contact.module
- Process the personal contact page form submission.
- contact_menu in core/modules/contact/contact.module
- Implementation of hook_menu().
- contact_user_page in core/modules/contact/contact.module
- Personal contact page.
- contemplate_edit_type in contrib/contemplate/contemplate.module
- contemplate_edit_type_form_submit in contrib/contemplate/contemplate.module
- contemplate_help in contrib/contemplate/contemplate.module
- Implementation of hook_help().
- contemplate_menu in contrib/contemplate/contemplate.module
- Implementation of hook_menu().
- content_menu in contrib/cck/content.module
- Implementation of hook_menu().
- date_menu in contrib/date/date/date.module
- Implementation of hook_menu().
- devel_menu in contrib/devel/devel.module
- Implementation of hook_menu().
- devel_node_access_block in contrib/devel/devel_node_access.module
- email_mail_page_form_submit in contrib/email/email.module
- Process the site-wide contact page form submission.
- emimport_import_submit in contrib/emfield/contrib/emimport/emimport.module
- This will import the selected set items as new nodes.
- event_block in contrib/event/event.module
- Provides the blocks that this module is capable of displaying.
- event_menu in contrib/event/event.module
- Implementation of hook_menu()
- event_node_ical in contrib/event/event.module
- Return an ical for a specific event
- event_page in contrib/event/event.module
- Displays a page containing event information. The page layout defaults to a graphical calendar.
- fieldgroup_menu in contrib/cck/fieldgroup.module
- filter_admin_configure in core/modules/filter/filter.module
- Menu callback; display settings defined by filters.
- filter_admin_delete in core/modules/filter/filter.module
- Menu callback; confirm deletion of a format.
- filter_help in core/modules/filter/filter.module
- Implementation of hook_help().
- filter_menu in core/modules/filter/filter.module
- Implementation of hook_menu().
- filter_tips_long in core/modules/filter/filter.module
- Menu callback; show a page with long filter tips.
- fivestar_block in contrib/fivestar/fivestar.module
- forum_menu in core/modules/forum/forum.module
- Implementation of hook_menu().
- forum_prepare in core/modules/forum/forum.module
- Implementation of hook_prepare; assign forum taxonomy when adding a topic from within a forum.
- gmap_location_block in contrib/gmap/gmap_location.module
- Draw block of location for current node.
- gmap_location_node_point in contrib/gmap/gmap_location.module
- AHAH callback for getting the contents of a node point popup.
- gmap_location_user_point in contrib/gmap/gmap_location.module
- AHAH callback for getting the contents of a user point popup.
- googleanalytics_footer in contrib/google_analytics/googleanalytics.module
- Implementation of hook_footer() to insert Javascript at the end of the page
- help_page in core/modules/help/help.module
- Menu callback; prints a page listing general help for all modules.
- i18n_db_rewrite_sql in contrib/i18n/i18n.module
- Implementation of hook_db_rewrite_sql()
- i18n_form_alter in contrib/i18n/i18n.module
- Implementation of hook_form_alter
- i18n_menu in contrib/i18n/i18n.module
- Implementation of hook_menu(). Modify rewriting conditions when viewing specific nodes
- i18n_nodeapi in contrib/i18n/i18n.module
- Implementation of hook_nodeapi().
- imagecache_ui_menu in contrib/imagecache/imagecache_ui.module
- image_attach_block in contrib/image/contrib/image_attach/image_attach.module
- Implementation of hook_block().
- image_gallery_menu in contrib/image/contrib/image_gallery/image_gallery.module
- imce_menu in contrib/imce/imce.module
- Implementation of hook_menu().
- img_assist_block in contrib/img_assist/img_assist.module
- Implementation of hook_block().
- img_assist_form_alter in contrib/img_assist/img_assist.module
- Implementation of hook_form_alter().
- img_assist_loader in contrib/img_assist/img_assist.module
- Output main img_assist interface HTML.
- img_assist_menu in contrib/img_assist/img_assist.module
- Implementation of hook_menu().
- img_assist_nodeapi in contrib/img_assist/img_assist.module
- Implementation of hook_nodeapi().
- img_assist_popup in contrib/img_assist/img_assist.module
- img_assist_properties in contrib/img_assist/img_assist.module
- Load the image properties pane.
- img_assist_thumbs in contrib/img_assist/img_assist.module
- Load the thumbnail display pane.
- jcalendar_menu in contrib/calendar/jcalendar/jcalendar.module
- Implemetation of hook_menu()
- legacy_menu in core/modules/legacy/legacy.module
- Implementation of hook_menu().
- lightbox2_form_alter in contrib/lightbox2/lightbox2.module
- Implementation of hook_form_alter().
- lightbox2_menu in contrib/lightbox2/lightbox2.module
- Implementation of hook_menu().
- locale_menu in core/modules/locale/locale.module
- Implementation of hook_menu().
- location_geocoding_options_page in contrib/location/location.d5.inc
- Callback for geocoding options page.
- location_search_form_alter in contrib/location/contrib/location_search/location_search.module
- logintoboggan_form_alter in contrib/logintoboggan/logintoboggan.module
- Implementation of hook_form_alter()
- logintoboggan_menu in contrib/logintoboggan/logintoboggan.module
- Implementation of hook_menu()
- menu_get_active_help in core/includes/menu.inc
- Returns the help associated with the active menu item.
- nice_menus_form_alter in contrib/nice_menus/nice_menus.module
- Implementation of hook_form_alter().
- nodequeue_menu in contrib/nodequeue/nodequeue.module
- Implementation of hook_menu
- node_form_alter in core/modules/node/node.module
- Implementation of hook_form_alter().
- node_help in core/modules/node/node.module
- Implementation of hook_help().
- node_menu in core/modules/node/node.module
- Implementation of hook_menu().
- node_revisions in core/modules/node/node.module
- Menu callback for revisions related activities.
- og_menu in contrib/og/og.module
- og_notifications_form_alter in contrib/og/og_notifications/og_notifications.module
- Implementation of hook_form_alter().
- og_notifications_menu in contrib/og/og_notifications/og_notifications.module
- Implementation of hook_menu().
- og_panels_help in contrib/og/og_panels.module
- og_panels_menu in contrib/og/og_panels.module
- og_theme in contrib/og/og.module
- Override theme based on what group is being displayed (if any). Be smart about selecting the 'active' group for ambigous urls like node/$nid
- og_view_group in contrib/og/og.module
- page_title_get_title in contrib/page_title/page_title.module
- Simple wrapper function to get the currently set title for a page
- page_title_menu in contrib/page_title/page_title.module
- Implementation of hook_menu().
- page_title_page_get_title in contrib/page_title/page_title.module
- Determines what title should be sent to the page template.
- panels_ajax_passthru in contrib/panels/panels.module
- Helper function for our AJAX stuff to call through to the right location
- panels_mini_menu in contrib/panels/panels_mini/panels_mini.module
- Implementation of hook_menu().
- panels_node_form in contrib/panels/panels_node/panels_node.module
- Implementation of hook_form().
- panels_node_menu in contrib/panels/panels_node/panels_node.module
- Implementation of hook_menu().
- panels_page_menu in contrib/panels/panels_page/panels_page.module
- Implementation of hook_menu().
- pathauto_form_alter in contrib/pathauto/pathauto.module
- Implementation of hook_form_alter().
- path_redirect_help in contrib/path_redirect/path_redirect.module
- Implementation of hook_help
- phptemplate_page in core/themes/engines/phptemplate/phptemplate.engine
- Prepare the values passed to the theme_page function to be passed into a pluggable template engine. Uses the arg() function to generate a series of page template files suggestions based on the current path. If none are found, the default page.tpl.php...
- poll_cancel in core/modules/poll/poll.module
- Callback for canceling a vote
- poll_menu in core/modules/poll/poll.module
- Implementation of hook_menu().
- poll_results in core/modules/poll/poll.module
- Callback for the 'results' tab for polls you can vote on
- poll_view in core/modules/poll/poll.module
- Implementation of hook_view().
- poll_vote in core/modules/poll/poll.module
- Callback for processing a vote
- poll_votes in core/modules/poll/poll.module
- Callback for the 'votes' tab for polls you can see other votes on
- profile_block in core/modules/profile/profile.module
- Implementation of hook_block().
- profile_browse in core/modules/profile/profile.module
- Menu callback; display a list of user information.
- profile_field_form in core/modules/profile/profile.module
- Menu callback: Generate a form to add/edit a user profile field.
- search_menu in core/modules/search/search.module
- Implementation of hook_menu().
- search_view in core/modules/search/search.module
- Menu callback; presents the search form and/or search results.
- simplenews_menu in contrib/simplenews/simplenews.module
- Implementation of hook_menu().
- site_map_block in contrib/site_map/site_map.module
- Implementation of hook_block().
- statistics_exit in core/modules/statistics/statistics.module
- Implementation of hook_exit().
- statistics_menu in core/modules/statistics/statistics.module
- Implementation of hook_menu().
- statistics_node_tracker in core/modules/statistics/statistics.module
- statistics_user_tracker in core/modules/statistics/statistics.module
- system_help in core/modules/system/system.module
- Implementation of hook_help().
- system_menu in core/modules/system/system.module
- Implementation of hook_menu().
- tagadelic_block in contrib/tagadelic/tagadelic.module
- implementation of hook_block
- tagadelic_page_chunk in contrib/tagadelic/tagadelic.module
- menu callback renders a tagadelic page
- tagadelic_page_list in contrib/tagadelic/tagadelic.module
- menu callback renders a tagadelic page with listed items: each voc
- taxonomy_menu in core/modules/taxonomy/taxonomy.module
- Implementation of hook_menu().
- theme_book_admin_table in core/modules/book/book.module
- theme_imagefield_image_imagecache_lightbox2 in contrib/lightbox2/lightbox2.module
- Generate the HTML output for imagefield + imagecache images so they can be opened in a lightbox by clicking on the image on the node page or in a view.
- theme_lightbox2_image_ncck in contrib/lightbox2/lightbox2.module
- Generate the HTML output to open embedded cck images in a lightbox.
- theme_uc_payment_method_credit_form in contrib/ubercart/payment/uc_credit/uc_credit.module
- theme_webform_results_submissions in contrib/webform/webform_report.inc
- Theme the submissions tab of the webform results page.
- thickbox_form_alter in contrib/thickbox/thickbox.module
- Implementation of hook_form_alter(). Reformat the login form.
- tinymce_admin in contrib/tinymce/tinymce.module
- Controller for tinymce administrative settings.
- tinymce_profile_form_build in contrib/tinymce/tinymce.module
- Return an HTML form for profile configuration.
- tracker_menu in core/modules/tracker/tracker.module
- Implementation of hook_menu().
- tracker_track_user in core/modules/tracker/tracker.module
- Menu callback. Prints a listing of active nodes on the site.
- translation_menu in contrib/i18n/translation/translation.module
- Implementation of hook_menu().
- translation_node_page in contrib/i18n/translation/translation.module
- This is the callback for the tab 'translation' for nodes
- translation_taxonomy_admin in contrib/i18n/translation/translation.module
- uc_2checkout_finalize in contrib/ubercart/payment/uc_2checkout/uc_2checkout.module
- uc_2checkout_ucga_display in contrib/ubercart/payment/uc_2checkout/uc_2checkout.module
- Implementation of hook_ucga_display().
- uc_attribute_help in contrib/ubercart/uc_attribute/uc_attribute.module
- Implementation of hook_help().
- uc_attribute_menu in contrib/ubercart/uc_attribute/uc_attribute.module
- Implementation of hook_menu().
- uc_authorizenet_menu in contrib/ubercart/payment/uc_authorizenet/uc_authorizenet.module
- Implementation of hook_menu().
- uc_cart_links_menu in contrib/ubercart/uc_cart_links/uc_cart_links.module
- Implementation of hook_menu().
- uc_credit_encrypt_existing in contrib/ubercart/payment/uc_credit/uc_credit.module
- uc_credit_menu in contrib/ubercart/payment/uc_credit/uc_credit.module
- Implementation of hook_menu().
- uc_credit_order in contrib/ubercart/payment/uc_credit/uc_credit.module
- Implementation of hook_order().
- uc_credit_payment_method in contrib/ubercart/payment/uc_credit/uc_credit.module
- Implementation of hook_payment_method().
- uc_cybersource_menu in contrib/ubercart/payment/uc_cybersource/uc_cybersource.module
- Implementation of hook_menu().
- uc_file_menu in contrib/ubercart/uc_file/uc_file.module
- Implementation of hook_menu().
- uc_flatrate_menu in contrib/ubercart/shipping/uc_flatrate/uc_flatrate.module
- Implementation of hook_menu().
- uc_googleanalytics_display in contrib/ubercart/uc_googleanalytics/uc_googleanalytics.module
- Determines whether or not to display the e-commerce related JS through GA on the current page.
- uc_order_admin in contrib/ubercart/uc_order/uc_order.module
- Display the main order admin screen, an overview of all received orders.
- uc_order_menu in contrib/ubercart/uc_order/uc_order.module
- Implementation of hook_menu().
- uc_order_search_form in contrib/ubercart/uc_order/uc_order.module
- uc_order_select_customer in contrib/ubercart/uc_order/uc_order.module
- uc_order_select_customer_form in contrib/ubercart/uc_order/uc_order.module
- uc_order_usearch in contrib/ubercart/uc_order/uc_order.module
- Display a search form to browse all received orders.
- uc_order_view in contrib/ubercart/uc_order/uc_order.module
- Display the order view screen, constructed via hook_order_pane().
- uc_payment_get_details in contrib/ubercart/payment/uc_payment/uc_payment.module
- uc_payment_menu in contrib/ubercart/payment/uc_payment/uc_payment.module
- Implementation of hook_menu().
- uc_payment_method_credit_form in contrib/ubercart/payment/uc_credit/uc_credit.module
- uc_payment_pack_menu in contrib/ubercart/payment/uc_payment_pack/uc_payment_pack.module
- uc_product_default in contrib/ubercart/uc_product/uc_product.module
- uc_product_features in contrib/ubercart/uc_product/uc_product.module
- Displays the project features tab on a product node edit form.
- uc_product_feature_add_form_submit in contrib/ubercart/uc_product/uc_product.module
- Submit handler for uc_product_feature_add_form_submit.
- uc_product_feature_form in contrib/ubercart/uc_product/uc_product.module
- Returns a form array with some default hidden values and submit button.
- uc_product_feature_save in contrib/ubercart/uc_product/uc_product.module
- Save a product feature to a product node.
- uc_product_form_alter in contrib/ubercart/uc_product/uc_product.module
- uc_product_menu in contrib/ubercart/uc_product/uc_product.module
- Implementation of hook_menu().
- uc_product_table in contrib/ubercart/uc_product/uc_product.module
- Display product fields in a TAPIr table.
- uc_recurring_admin in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_admin_charge_form in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_admin_charge_form_submit in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_admin_delete_form_submit in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_admin_edit_form in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_admin_edit_form_submit in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_admin_filter_form in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- uc_recurring_menu in contrib/ubercart/payment/uc_recurring/uc_recurring.module
- Implementation of hook_menu().
- uc_reports_menu in contrib/ubercart/uc_reports/uc_reports.module
- Implementation of hook_menu().
- uc_reports_products_custom in contrib/ubercart/uc_reports/uc_reports.module
- Display the product reports
- uc_reports_sales_custom in contrib/ubercart/uc_reports/uc_reports.module
- uc_reports_sales_year in contrib/ubercart/uc_reports/uc_reports.module
- uc_roles_deletion_form in contrib/ubercart/uc_roles/uc_roles.module
- Form builder for role expirations
- uc_roles_menu in contrib/ubercart/uc_roles/uc_roles.module
- Implementation of hook_menu().
- uc_shipping_menu in contrib/ubercart/shipping/uc_shipping/uc_shipping.module
- Implementation of hook_shipping_menu().
- uc_stock_help in contrib/ubercart/uc_stock/uc_stock.module
- Implementation of hook_help().
- uc_stock_menu in contrib/ubercart/uc_stock/uc_stock.module
- Implementation of hook_menu().
- uc_stock_report in contrib/ubercart/uc_stock/uc_stock.module
- uc_stock_report_form in contrib/ubercart/uc_stock/uc_stock.module
- uc_store_customer_search in contrib/ubercart/uc_store/uc_store.module
- Display the customer search page.
- uc_store_customer_search_form in contrib/ubercart/uc_store/uc_store.module
- uc_store_menu in contrib/ubercart/uc_store/uc_store.module
- Implementation of hook_menu().
- uc_ups_menu in contrib/ubercart/shipping/uc_ups/uc_ups.module
- Implementation of hook_menu().
- uc_weightquote_menu in contrib/ubercart/shipping/uc_weightquote/uc_weightquote.module
- Implementation of hook_menu().
- update_status_help in contrib/update_status/update_status.module
- Implementation of hook_help().
- userreference_user in contrib/cck/userreference.module
- Implementation of hook_user().
- user_admin_role in core/modules/user/user.module
- Menu callback: administer roles.
- user_block in core/modules/user/user.module
- Implementation of hook_block().
- user_edit in core/modules/user/user.module
- user_menu in core/modules/user/user.module
- Implementation of hook_menu().
- user_user in core/modules/user/user.module
- Implementation of hook_user().
- views_menu in contrib/views/views.module
- Implementation of hook_menu()
- views_menu_inline_items in contrib/views/views.module
- watchdog_menu in core/modules/watchdog/watchdog.module
- Implementation of hook_menu().
- webform_client_form in contrib/webform/webform.module
- Client form generation function. If this is displaying an existing submission, pass in the $submission variable with the contents of the submission to be displayed.
- webform_help in contrib/webform/webform.module
- Implementation of hook_help().
- webform_menu in contrib/webform/webform.module
- Implementation of hook_menu().
- wysiwyg_menu in contrib/wysiwyg/wysiwyg.module
- Implementation of hook_menu().
- zen_preprocess_page in contrib/zen/template.php
- Override or insert PHPTemplate variables into the page templates.
- _date_views_query_alter in contrib/date/date/date_views.inc
- Implementation of hook_views_query().
- _nodewords_detect_type_and_ids in contrib/nodewords/nodewords.module
- Try to guess the $type and $ids by looking at $_GET['q'].
- _tinymce_page_match in contrib/tinymce/tinymce.module
- Determine if TinyMCE has permission to be used on the current page.
- _uc_catalog_navigation in contrib/ubercart/uc_catalog/uc_catalog.module
- Emulates Drupal's menu system, but based soley on the structure of "Product Catalog".
- _user_edit_validate in core/modules/user/user.module
Code
core/includes/path.inc, line 147
<?php
function arg($index) {
static $arguments, $q;
if (empty($arguments) || $q != $_GET['q']) {
$arguments = explode('/', $_GET['q']);
$q = $_GET['q'];
}
if (isset($arguments[$index])) {
return $arguments[$index];
}
}
?>


