hook_shortcut_default_set

hook_shortcut_default_set($account) Return the name of a default shortcut set for the provided user account. This hook allows modules to define default shortcut sets for a particular user that differ from the site-wide default (for example, a module may want to define default shortcuts on a per-role basis). The default shortcut set is used only when the user does not have any other shortcut set explicitly assigned to them. Note that only one default shortcut set can exist per user, so when mult

hook_search_preprocess

hook_search_preprocess($text, $langcode = NULL) Preprocess text for search. This hook is called to preprocess both the text added to the search index and the keywords users have submitted for searching. The same processing needs to be applied to both so that searches will find matches. Possible uses: Adding spaces between words of Chinese or Japanese text. Stemming words down to their root words to allow matches between, for instance, walk, walked, walking, and walks in searching. Expanding abb

hook_schema

hook_schema() Define the current version of the database schema. A Drupal schema definition is an array structure representing one or more tables and their related keys and indexes. A schema is defined by hook_schema() which must live in your module's .install file. The tables declared by this hook will be automatically created when the module is installed, and removed when the module is uninstalled. This happens before hook_install() is invoked, and after hook_uninstall() is invoked, respectiv

hook_rest_type_uri_alter

hook_rest_type_uri_alter(&$uri, $context = array()) Alter the REST type URI. Modules may wish to alter the type URI generated for a resource based on the context of the serializer/normalizer operation. Parameters string $uri: The URI to alter. array $context: The context from the serializer/normalizer operation. See also \Symfony\Component\Serializer\SerializerInterface::serialize() \Symfony\Component\Serializer\SerializerInterface::deserialize() \Symfony\Component\Serializer\NormalizerIn

hook_rest_resource_alter

hook_rest_resource_alter(&$definitions) Alter the resource plugin definitions. Parameters array $definitions: The collection of resource definitions. Related topics Hooks Define functions that alter the behavior of Drupal core. File core/modules/rest/rest.api.php, line 19 Describes hooks provided by the RESTful Web Services module. Code function hook_rest_resource_alter(&$definitions) { if (isset($definitions['entity:node'])) { // We want to handle REST requests regarding nod

hook_rest_relation_uri_alter

hook_rest_relation_uri_alter(&$uri, $context = array()) Alter the REST relation URI. Modules may wish to alter the relation URI generated for a resource based on the context of the serializer/normalizer operation. Parameters string $uri: The URI to alter. array $context: The context from the serializer/normalizer operation. See also \Symfony\Component\Serializer\SerializerInterface::serialize() \Symfony\Component\Serializer\SerializerInterface::deserialize() \Symfony\Component\Serializer\

hook_requirements

hook_requirements($phase) Check installation requirements and do status reporting. This hook has three closely related uses, determined by the $phase argument: Checking installation requirements ($phase == 'install'). Checking update requirements ($phase == 'update'). Status reporting ($phase == 'runtime'). Note that this hook, like all others dealing with installation and updates, must reside in a module_name.install file, or it will not properly abort the installation of the module if a cri

hook_render_template

hook_render_template($template_file, $variables) Render a template using the theme engine. Parameters string $template_file: The path (relative to the Drupal root directory) to the template to be rendered including its extension in the format 'path/to/TEMPLATE_NAME.EXT'. array $variables: A keyed array of variables that are available for composing the output. The theme engine is responsible for passing all the variables to the template. Depending on the code in the template, all or just a subs

hook_rebuild

hook_rebuild() Rebuild data based upon refreshed caches. This hook allows your module to rebuild its data based on the latest/current module data. It runs after hook_cache_flush() and after all module data has been updated. This hook is only invoked after the system has been completely cleared; i.e., all previously cached data is known to be gone and every API in the system is known to return current information, so your module can safely rely on all available data to rebuild its own. See also

hook_ranking

hook_ranking() Provide additional methods of scoring for core search results for nodes. A node's search score is used to rank it among other nodes matched by the search, with the highest-ranked nodes appearing first in the search listing. For example, a module allowing users to vote on content could expose an option to allow search results' rankings to be influenced by the average voting score of a node. All scoring mechanisms are provided as options to site administrators, and may be tweaked b