summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-08 21:22:59 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-08 21:22:59 +0000
commit341a95b80353ce93c62050c3051c6402063da5dc (patch)
tree9a3e288e6b05c4f1725373e2afceb780e6f8739b
parentd802c69a43ab0f47e88f8b26ea9f655af1404a5f (diff)
downloadbrdo-341a95b80353ce93c62050c3051c6402063da5dc.tar.gz
brdo-341a95b80353ce93c62050c3051c6402063da5dc.tar.bz2
#369562 by bjaspan and yched: Clean up a few minor things in field API.
-rw-r--r--modules/field/field.autoload.inc2
-rw-r--r--modules/field/field.crud.inc11
-rw-r--r--modules/field/field.default.inc17
-rw-r--r--modules/field/field.info.inc6
-rw-r--r--modules/field/field.module13
-rw-r--r--modules/simpletest/tests/field_test.info2
6 files changed, 28 insertions, 23 deletions
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 @@
<?php
+// $Id$
+
/**
* DO NOT EDIT THIS FILE. It contains autoloading functions generated
* automatically by generate-autoload.pl. The function names,
diff --git a/modules/field/field.crud.inc b/modules/field/field.crud.inc
index 01f2743cd..6a2a8c1cc 100644
--- a/modules/field/field.crud.inc
+++ b/modules/field/field.crud.inc
@@ -1,5 +1,14 @@
<?php
+// $Id$
+/**
+ * @file
+ * TODO: Fill me in.
+ */
+
+/**
+ * TODO: Fill me in.
+ */
class FieldException extends Exception {}
/**
@@ -555,4 +564,4 @@ function field_delete_instance($field_name, $bundle) {
/**
* @} End of "defgroup field_crud".
- */ \ No newline at end of file
+ */
diff --git a/modules/field/field.default.inc b/modules/field/field.default.inc
index da2590c16..30e843401 100644
--- a/modules/field/field.default.inc
+++ b/modules/field/field.default.inc
@@ -1,16 +1,13 @@
<?php
+// $Id$
/**
* @file
- *
* Default 'implementations' of hook_field_*().
*
* Handles common field housekeeping.
* Those implementations are special, as field.module does not define any field
* types. Those functions take care of default stuff common to all field types.
- *
- * Storage ops ('load', 'insert', 'update', 'delete', 'delete revisions')
- * are not executed field by field, and are thus handled separately.
*/
function field_default_validate($obj_type, $object, $field, $instance, $items, $form) {
@@ -67,7 +64,7 @@ function field_default_submit($obj_type, &$object, $field, $instance, &$items, $
*
* The $object array will look like:
* $object->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 @@
<?php
+// $Id$
+
+/**
+ * @file
+ * TODO: Fill me in.
+ */
/**
* @defgroup field_info Field Info API
diff --git a/modules/field/field.module b/modules/field/field.module
index f954291d5..b559db900 100644
--- a/modules/field/field.module
+++ b/modules/field/field.module
@@ -14,8 +14,8 @@
* objects and takes care of storing, loading, editing, and rendering
* field data. Any object type (node, user, etc.) can use the Field
* API to make itself "fieldable" and thus allow fields to be attached
- * to it. Other modules can provide a user interface for managing custom
- * fields via a web browser as well as a wide and flexible variety of
+ * to it. Other modules can provide a user interface for managing custom
+ * fields via a web browser as well as a wide and flexible variety of
* data type, form element, and display format capabilities.
*
* - @link field_structs Data structures: Field, Instance, Bundle @endlink.
@@ -126,15 +126,6 @@ function field_menu() {
}
/**
- * Implementation of hook elements().
- */
-function field_elements() {
- return array(
- 'field' => array(),
- );
-}
-
-/**
* Implementation of hook_theme().
*/
function field_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