diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2014-05-07 17:06:02 -0700 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2014-05-07 17:06:02 -0700 |
commit | 076802cadd307d6b980676c7a2bb6497d90a9cbf (patch) | |
tree | 8281b24ca6e4580be8d25e5d6176a54ff649a9d4 /modules/field | |
parent | 4172af50d9f090cee9f96ba267f1ba8022228407 (diff) | |
download | brdo-076802cadd307d6b980676c7a2bb6497d90a9cbf.tar.gz brdo-076802cadd307d6b980676c7a2bb6497d90a9cbf.tar.bz2 |
Issue #2048395 by filijonka: Fix up group/topic membership for field hooks
Diffstat (limited to 'modules/field')
-rw-r--r-- | modules/field/field.api.php | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php index 5ed036947..365fc404c 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -1,4 +1,8 @@ <?php +/** + * @file + * Hooks provided by the Field module. + */ /** * @addtogroup hooks @@ -37,6 +41,8 @@ * - delete: (optional) String containing markup (normally a link) used as the * element's 'delete' operation in the administration interface. Only for * 'form' context. + * + * @ingroup field_types */ function hook_field_extra_fields() { $extra['node']['poll'] = array( @@ -76,6 +82,8 @@ function hook_field_extra_fields() { * The associative array of 'pseudo-field' components. * * @see hook_field_extra_fields() + * + * @ingroup field_types */ function hook_field_extra_fields_alter(&$info) { // Force node title to always be at the top of the list by default. @@ -656,6 +664,8 @@ function hook_field_delete_revision($entity_type, $entity, $field, $instance, $l * The source entity from which field values are being copied. * @param $source_langcode * The source language from which field values are being copied. + * + * @ingroup field_language */ function hook_field_prepare_translation($entity_type, $entity, $field, $instance, $langcode, &$items, $source_entity, $source_langcode) { // If the translating user is not permitted to use the assigned text format, @@ -1250,7 +1260,7 @@ function hook_field_formatter_view($entity_type, $entity, $field, $instance, $la */ /** - * @ingroup field_attach + * @addtogroup field_attach * @{ */ @@ -1523,6 +1533,8 @@ function hook_field_attach_prepare_translation_alter(&$entity, $context) { * - entity_type: The type of the entity to be displayed. * - entity: The entity with fields to render. * - langcode: The language code $entity has to be displayed in. + * + * @ingroup field_language */ function hook_field_language_alter(&$display_language, $context) { // Do not apply core language fallback rules if they are disabled or if Locale @@ -1544,6 +1556,8 @@ function hook_field_language_alter(&$display_language, $context) { * An associative array containing: * - entity_type: The type of the entity the field is attached to. * - field: A field data structure. + * + * @ingroup field_language */ function hook_field_available_languages_alter(&$languages, $context) { // Add an unavailable language. @@ -1609,7 +1623,7 @@ function hook_field_attach_delete_bundle($entity_type, $bundle, $instances) { } /** - * @} End of "defgroup field_attach". + * @} End of "addtogroup field_attach". */ /** @@ -2270,6 +2284,10 @@ function hook_field_storage_pre_update($entity_type, $entity, &$skip_fields) { } /** + * @} End of "addtogroup field_storage + */ + +/** * Returns the maximum weight for the entity components handled by the module. * * Field API takes care of fields and 'extra_fields'. This hook is intended for @@ -2282,9 +2300,12 @@ function hook_field_storage_pre_update($entity_type, $entity, &$skip_fields) { * @param $context * The context for which the maximum weight is requested. Either 'form', or * the name of a view mode. + * * @return * The maximum weight of the entity's components, or NULL if no components * were found. + * + * @ingroup field_info */ function hook_field_info_max_weight($entity_type, $bundle, $context) { $weights = array(); @@ -2297,6 +2318,11 @@ function hook_field_info_max_weight($entity_type, $bundle, $context) { } /** + * @addtogroup field_types + * @{ + */ + +/** * Alters the display settings of a field before it gets displayed. * * Note that instead of hook_field_display_alter(), which is called for all @@ -2363,6 +2389,10 @@ function hook_field_display_ENTITY_TYPE_alter(&$display, $context) { } /** + * @} End of "addtogroup field_types + */ + +/** * Alters the display settings of pseudo-fields before an entity is displayed. * * This hook is called once per displayed entity. If the result of the hook @@ -2377,6 +2407,8 @@ function hook_field_display_ENTITY_TYPE_alter(&$display, $context) { * - entity_type: The entity type; e.g., 'node' or 'user'. * - bundle: The bundle name. * - view_mode: The view mode, e.g. 'full', 'teaser'... + * + * @ingroup field_types */ function hook_field_extra_fields_display_alter(&$displays, $context) { if ($context['entity_type'] == 'taxonomy_term' && $context['view_mode'] == 'full') { @@ -2406,6 +2438,8 @@ function hook_field_extra_fields_display_alter(&$displays, $context) { * - instance: The instance of the field. * * @see hook_field_widget_properties_alter() + * + * @ingroup field_widget */ function hook_field_widget_properties_ENTITY_TYPE_alter(&$widget, $context) { // Change a widget's type according to the time of day. @@ -2417,10 +2451,6 @@ function hook_field_widget_properties_ENTITY_TYPE_alter(&$widget, $context) { } /** - * @} End of "addtogroup field_storage". - */ - -/** * @addtogroup field_crud * @{ */ @@ -2615,6 +2645,8 @@ function hook_field_purge_instance($instance) { * * @param $field * The field being purged. + * + * @ingroup field_storage */ function hook_field_storage_purge_field($field) { $table_name = _field_sql_storage_tablename($field); @@ -2632,6 +2664,8 @@ function hook_field_storage_purge_field($field) { * * @param $instance * The instance being purged. + * + * @ingroup field_storage */ function hook_field_storage_purge_field_instance($instance) { db_delete('my_module_field_instance_info') @@ -2653,6 +2687,8 @@ function hook_field_storage_purge_field_instance($instance) { * The (possibly deleted) field whose data is being purged. * @param $instance * The deleted field instance whose data is being purged. + * + * @ingroup field_storage */ function hook_field_storage_purge($entity_type, $entity, $field, $instance) { list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity); @@ -2692,6 +2728,8 @@ function hook_field_storage_purge($entity_type, $entity, $field, $instance) { * * @return * TRUE if the operation is allowed, and FALSE if the operation is denied. + * + * @ingroup field_types */ function hook_field_access($op, $field, $entity_type, $entity, $account) { if ($field['field_name'] == 'field_of_interest' && $op == 'edit') { |