From 341a95b80353ce93c62050c3051c6402063da5dc Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 8 Feb 2009 21:22:59 +0000 Subject: #369562 by bjaspan and yched: Clean up a few minor things in field API. --- modules/field/field.autoload.inc | 2 ++ modules/field/field.crud.inc | 11 ++++++++++- modules/field/field.default.inc | 17 +++++++---------- modules/field/field.info.inc | 6 ++++++ modules/field/field.module | 13 ++----------- modules/simpletest/tests/field_test.info | 2 +- 6 files changed, 28 insertions(+), 23 deletions(-) (limited to 'modules') diff --git a/modules/field/field.autoload.inc b/modules/field/field.autoload.inc index 7a9d45ab2..ee2d3552c 100644 --- a/modules/field/field.autoload.inc +++ b/modules/field/field.autoload.inc @@ -1,4 +1,6 @@ content['field_foo']['wrapper'] = array( - * '#type' => 'field', + * '#theme' => 'field', * '#title' => 'label' * '#field_name' => 'field_name', * '#object' => $object, @@ -171,7 +168,7 @@ function field_default_view($obj_type, $object, $field, $instance, $items, $teas $format_info = $info + array( '#formatter' => $display['type'], '#settings' => $display['settings'], - '#theme_wrapper' => $theme, + '#theme' => $theme, ); if ($single) { @@ -187,7 +184,7 @@ function field_default_view($obj_type, $object, $field, $instance, $items, $teas // The wrapper lets us get the themed output for the whole field // to populate the $FIELD_NAME_rendered variable for templates, // and hide it from the $content variable if needed. - // See 'preprocess' op and theme_content_field_wrapper()? + // See 'preprocess' op and theme_content_field_wrapper(). $wrapper = $info + array( 'field' => $element, '#weight' => $instance['weight'], @@ -220,8 +217,8 @@ function field_wrapper_post_render($content, $element) { * This is a theme function, so it can be overridden in different * themes to produce different results. * - * The html for individual fields and groups are available in the - * $FIELD_NAME_rendered and $GROUP_NAME_rendered variables. + * The html for individual fields are available in the $FIELD_NAME_rendered + * variables. * * @return * Whether or not the field's content is to be added in this context. @@ -250,4 +247,4 @@ function field_default_prepare_translation($obj_type, $object, $field, $instance $addition[$field['field_name']] = $object->translation_source->$field['field_name']; } return $addition; -} \ No newline at end of file +} diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc index 5ca11f837..e619e0488 100644 --- a/modules/field/field.info.inc +++ b/modules/field/field.info.inc @@ -1,4 +1,10 @@ array(), - ); -} - /** * Implementation of hook_theme(). */ diff --git a/modules/simpletest/tests/field_test.info b/modules/simpletest/tests/field_test.info index 3dd8f3fa1..88c67264c 100644 --- a/modules/simpletest/tests/field_test.info +++ b/modules/simpletest/tests/field_test.info @@ -2,7 +2,7 @@ name = "Field API Test" description = "Support module for the Field API tests." core = 7.x -package = testing +package = Testing files[] = field_test.module files[] = field_test.install version = VERSION -- cgit v1.2.3