Data Base Instruction

Go to front page

The code is red bugs, and API - translations. developer/hooks/core.php, string 1076 Versions 5 hook_menu ($may_cache) 6 hook_menu () "Translation" the Pre-image Defines choices and callback of pages. This хук allows to register to units paths which define the inquiries which are subject to handling. Depending on the type of filing requested for each path, the link finds room in the block of navigation and-or the item appears in the menu of management page (' q=admin/menu '). This хук is often called, for example, at unit inclusion. * ' title ': Without fail. Not translated title of the choice. * ' title callback ': Function for generation of a title of the choice, by default t (). If you wish to output raw strings, instal this parametre in FALSE. * ' title arguments': Arguments for function t () or your personal function. * ' description ': not Translated exposition of the choice. * ' page callback ': a Function name, page called for mapping when the user passes on the choice. If it is skipped, function of the parent choice will be called. * ' page arguments': the Array of the arguments, transferred functions ' page callback '. Integer values correspond to URL parts (see function arg ()). * ' access callback ': a Function name, returning the Boolean value defining, whether the user of access right to this choice has. On-default - user_access () or function of access of the parent choice. * ' access arguments': the Array of the arguments transferred in function ' access callback '. Integer values correspond to URL parts. * ' weight ': the Integer value designating a position of the item in the menu. By default equally 0. If are not assured, do not specify this value, sorting alphabetically is almost always better. * ' menu_name ': (опционально) a menu Title in which it is necessary to locate the item. On-default choices find room in menu Navigation. * ' type ': Type of the choice from the list: o MENU_NORMAL_ITEM: the Normal item which is shown in a tree of the menu and can be moved/is latent the manager. o MENU_CALLBACK: Registers function which something returns on an appropriate path. o MENU_SUGGESTED_ITEM: Units can "offer" the manager items which are useful for including. o MENU_LOCAL_TASK: Local tasks are mapped as табы. o MENU_DEFAULT_LOCAL_TASK: Each gang of local tasks should have one on-default which refers to the parent choice. If the parametre ' type ' is skipped, it is installed in MENU_NORMAL_ITEM on-default. Usage examples - page_example.module. Returned value Menu-control array. Each choice has a key which will agree with a path which is registered in Drupal. The item is an associative array who contains the following steams a key-value: Define menu items and page callbacks. This hook enables modules to register paths, which determines whose requests are to be handled. Depending on the type of registration requested by each path, a link is placed in the the navigation block and/or an item appears in the menu administration page (q=admin/menu). This hook is called rarely - for example when modules are enabled. * "title": Required. The untranslated title of the menu item. * "title callback": Function to generate the title, defaults to t (). If you require only the raw string to be output, set this to FALSE. * "title arguments": Arguments to send to t () or your custom callback. * "description": The untranslated description of the menu item. * "page callback": The function to call to display a web page when the user visits the path. If omitted, the parent menu item's callback will be used instead. * "page arguments": An array of arguments to pass to the page callback function. Integer values pass the corresponding URL component (see arg ()). * "access callback": A function returning a boolean value that determines whether the user has access rights to this menu item. Defaults to user_access () unless a value is inherited from a parent menu item. * "access arguments": An array of arguments to pass to the access callback function. Integer values pass the corresponding URL component. * "weight": An integer that determines relative position of items in the menu; higher-weighted items sink. Defaults to 0. When in doubt, leave this alone; the default alphabetical order is usually best. * "menu_name": Optional. Set this to a custom menu if you do not want your item to be placed in Navigation. * "type": A bitmask of flags describing properties of the menu item. Many shortcut bitmasks are provided as constants in o MENU_NORMAL_ITEM: Normal menu items show up in the menu tree and can be moved/hidden by the administrator. o MENU_CALLBACK: Callbacks simply register a path so that the correct function is fired when the URL is accessed. o MENU_SUGGESTED_ITEM: Modules may "suggest" menu items that the administrator may enable. o MENU_LOCAL_TASK: Local tasks are rendered as tabs by default. o MENU_DEFAULT_LOCAL_TASK: Every set of local tasks should provide one "default" task, that links to the same path as its parent when clicked. If the "type" key is omitted, MENU_NORMAL_ITEM is assumed. For a detailed usage example, see page_example.module. For comprehensive documentation on the menu system, see Return value An array of menu items. Each menu item has a key corresponding to the Drupal path being registered. The item is an associative array that may contain the following key-value pairs: The linked subjects ’уки Allows units to co-operate with kernel Drupal. ? 1 function calls hook_menu ()