From fbfa7a4150a40d6df9347692bb6681f45f804c7d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 13 Oct 2009 16:38:43 +0000 Subject: - Patch #593522 by sun: a better and faster drupal_alter(). --- modules/field/field.api.php | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'modules/field/field.api.php') diff --git a/modules/field/field.api.php b/modules/field/field.api.php index 52673a39c..60e54d5d8 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -932,15 +932,15 @@ function hook_field_attach_presave($obj_type, $object) { * This hook is invoked while preprocessing the field.tpl.php template file. * * @param $variables - * The variables array is passed by reference and will be populated with field values. - * @param $obj_type - * The type of $object; e.g. 'node' or 'user'. - * @param $object - * The object with fields to render. - * @param $element - * The structured array containing the values ready for rendering. + * The variables array is passed by reference and will be populated with field + * values. + * @param $context + * An associative array containing: + * - obj_type: The type of $object; e.g. 'node' or 'user'. + * - object: The object with fields to render. + * - element: The structured array containing the values ready for rendering. */ -function hook_field_attach_preprocess_alter(&$variables, $obj_type, $object, $element) { +function hook_field_attach_preprocess_alter(&$variables, $context) { } /** @@ -1042,18 +1042,16 @@ function hook_field_attach_delete_revision($obj_type, $object) { * * This hook is invoked after the field module has performed the operation. * - * @param $output - * The structured content array tree for all of $object's fields. - * @param $obj_type - * The type of $object; e.g. 'node' or 'user'. - * @param $object - * The object with fields to render. - * @param $build_mode - * Build mode, e.g. 'full', 'teaser'... - * @param $langcode - * The language in which the field values will be displayed. + * @param &$output + * The structured content array tree for all of $object's fields. + * @param $context + * An associative array containing: + * - obj_type: The type of $object; e.g. 'node' or 'user'. + * - object: The object with fields to render. + * - build_mode: Build mode, e.g. 'full', 'teaser'... + * - langcode: The language in which the field values will be displayed. */ -function hook_field_attach_view_alter($output, $obj_type, $object, $build_mode, $langcode) { +function hook_field_attach_view_alter(&$output, $context) { } /** -- cgit v1.2.3