summaryrefslogtreecommitdiff
path: root/modules/field/field.api.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r--modules/field/field.api.php34
1 files changed, 33 insertions, 1 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 51489c28d..64b23e929 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -1062,12 +1062,44 @@ function hook_field_attach_delete_revision($entity_type, $entity) {
* - obj_type: The type of $entity; e.g. 'node' or 'user'.
* - object: The entity with fields to render.
* - view_mode: View mode, e.g. 'full', 'teaser'...
- * - langcode: The language in which the field values will be displayed.
*/
function hook_field_attach_view_alter(&$output, $context) {
}
/**
+ * Act on field_language().
+ *
+ * This hook is invoked to alter the array of display languages for the given
+ * entity.
+ *
+ * @param $display_language
+ * A reference to an array of language codes keyed by field name.
+ * @param $context
+ * An associative array containing:
+ * - 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.
+ */
+function hook_field_language_alter(&$display_language, $context) {
+}
+
+/**
+ * Act on field_available_languages().
+ *
+ * This hook is invoked to alter the array of available languages for the given
+ * field.
+ *
+ * @param &$languages
+ * A reference to an array of language codes to be made available.
+ * @param $context
+ * An associative array containing:
+ * - entity_type: The type of the entity the field is attached to.
+ * - field: A field data structure.
+ */
+function hook_field_available_languages_alter(&$languages, $context) {
+}
+
+/**
* Act on field_attach_create_bundle.
*
* This hook is invoked after the field module has performed the operation.