Functions
Search API
Primary tabs
Name | Location | Description |
---|---|---|
hook_validate |
includes/ |
Validates form submissions from the Form API |
hook_form_alter |
includes/ |
Alter forms which are created using the Form API |
menu_get_menu_router_item_from_db |
includes/ |
Return array from menu_router for this item. * |
menu_convert_replacement_pattern |
includes/ |
Look for modules implementing hook_menu_handle_replacement_pattern, and apply to str. |
menu_rebuild_cache |
includes/ |
Go through all installed modules and rebuild the menu_router table, based on each module's hook_menu function. |
menu_get_module_path |
includes/ |
|
menu_check_user_access |
includes/ |
Looks at the router item's details (from menu_get_item) and returns TRUE or FALSE if the user can access this item. |
menu_execute_page_request |
includes/ |
|
menu_get_items_beginning_with |
includes/ |
Return menu_items whose path begins with the menu_root. Ex: "tools" would return tools/fun and tools/here/there |
menu_get_items_in_tab_family |
includes/ |
|
menu_get_item |
includes/ |
Figure out which menu_router path matches the supplied path and return it. |
fp_get_module_details |
includes/ |
Simply returns the module's row from the modules table, if it exists. |
get_term_structures |
includes/ |
Return an array version of the term_id_structure field from the admin settings |
fp_http_request |
includes/ |
Send a request through the Internet and return the result as an object. |
timer_start |
includes/ |
Begin a microtime timer for later use. |
timer_read |
includes/ |
Works with the timer_start() function to return how long it has been since the start. |
fp_clear_cache |
includes/ |
Call all modules which implement hook_clear_cache |
filter_markup |
includes/ |
Filter HTML, allowing only certain tags, and removing dangerous attributes. |
filter_xss |
includes/ |
This function is taken almost directly from Drupal 7's core code. It is used to help us filter out dangerous HTML which the user might type. From the D7 documentation: |
filter_xss_split |
includes/ |
Like the filter_xss function, this is taken from D7's _filter_xss_split function |
filter_xss_attributes |
includes/ |
|
filter_xss_bad_protocol |
includes/ |
|
fp_strip_dangerous_protocols |
includes/ |
|
fp_validate_utf8 |
includes/ |
|
fp_set_page_tabs |
includes/ |
If this function is called, it will override any other page tabs which might be getting constructed. This lets the programmer, at run-time, completely control what tabs are at the top of the page. |
fp_set_page_sub_tabs |
includes/ |
Allows the programmer to define subtabs at the top of the page. |
fp_set_title |
includes/ |
Allows the programmer to set the title of the page, overwriting any default title. |
fp_token |
includes/ |
Returns back the site's "token", which is a simply md5 of some randomness. It is used primarily with forms, to ensure against cross-site forgeries. The site's token gets saved to the variables table, for later use. The idea is… |
csv_to_array |
includes/ |
Simple function to split a basic CSV string, trim all elements, then return the resulting array. |
fp_add_message |
includes/ |
Add a "message" to the top of the screen. Useful for short messages like "You have been logged out" or "Form submitted successfully." |
fp_add_css |
includes/ |
Add an extra CSS file to the page with this function. Ex: fp_add_css(fp_get_module_path("admin") . '/css/admin.css'); |
fp_add_js |
includes/ |
Add extra javascript to the page. |
fp_get_module_path |
includes/ |
Return the filepath to the module |
t |
includes/ |
Eventually, this function will be used to translate strings. For now, just pass through. Allows variable replacements. Use like this: t("@name's blob", array("@name" => "Richard")); or simply t("My… |
st |
includes/ |
Provides translation functionality when database is not available. |
base_path |
includes/ |
Shortcut for getting the base_path variable from the global system settings. |
get_term_description |
includes/ |
Convert a term ID into a description. Ex: 20095 = Spring of 2009. |
fp_goto |
includes/ |
Redirect the user's browser to the specified internal path + query. |
l |
includes/ |
This works like Drupal's l() function for creating links. Ex: l("Click here for course search!", "tools/course-search", "abc=xyz&hello=goodbye", array("class" => "my-class")); Do not… |
fp_url |
includes/ |
This function will take a path, ex: "admin/config/module" and a query, ex: "nid=5&whatever=yes" And join them together, respecting whether or not clean URL's are enabled. |
fp_screen_is_mobile |
includes/ |
This function will attempt to determine automatically if we are on a mobile device, and should therefor use the mobile theme and layout settings. |
modules_implement_hook |
includes/ |
Return an array of enabled modules which implement the provided hook. Do not include the preceeding "_" on the hook name! |
invoke_hook |
includes/ |
Invoke all module hooks for the supplied hook. |
get_global_database_handler |
includes/ |
This method will return a globally-set DatabaseHandler object, creating it if it does not already exist. This is for efficiency reasons, so every module or method does not need to keep creating databasehandler objects (and re-connecting to the database). |
fpm |
includes/ |
Uses fp_add_message, but in this case, it also adds in the filename and line number which the message came from! |
depricated_message |
includes/ |
Displays a depricated message on screen. Useful for tracking down when depricated functions are being used. |
fp_html_print_r |
includes/ |
Similar to print_r, this will return an HTML-friendly click-to-open system similar in design to Krumo. |
get_shorter_catalog_year_range |
includes/ |
This is used usually when being viewed by a mobile device. It will shorten a catalog year range of 2008-2009 to just "08-09" or "2008-09" or even "09-2009". |
include_module |
includes/ |
This will find and include the module in question, calling it's hook_init() function if it has one. |
fp_truncate_decimals |
includes/ |
This simple function will take a number and truncate the number of decimals to the requested places. This can be used in place of number_format(), which *rounds* numbers. |