From bba8bf72c93aa83a67d2dba0c13cde72fe3cdbbc Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Thu, 6 Oct 2011 09:39:48 -0400
Subject: [PATCH] Issue #1300494 by pillarsdotnet: Update the documentation
 for hook_field_is_empty() to note that it is required, and
 to define the data types of its parameters and return
 value.

---
 modules/field/field.api.php |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 88f9231ac8ce711cee6e21b17a52c2859e40a0ed..0436ff8e1211d6f2998c846b5497aca3b97782e9 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -650,16 +650,21 @@ function hook_field_prepare_translation($entity_type, $entity, $field, $instance
 }
 
 /**
- * Define what constitutes an empty item for a field type.
+ * Determines whether the given field instance is empty.
  *
- * @param $item
- *   An item that may or may not be empty.
- * @param $field
- *   The field to which $item belongs.
+ * This hook is required for all field type implementations.
+ *
+ * @param array $item
+ *   A field instance that may or may not be empty.
+ * @param array $field
+ *   The field type as returned from field_info_field().
  *
  * @return
- *   TRUE if $field's type considers $item not to contain any data;
- *   FALSE otherwise.
+ *   TRUE if $item is an instance of type $field and empty of data;
+ *   FALSE if $item is an instance of type $field containing data;
+ *   undefined if $item is not an instance of type $field.
+ *
+ * @see _field_filter_items().
  */
 function hook_field_is_empty($item, $field) {
   if (empty($item['value']) && (string) $item['value'] !== '0') {
-- 
1.7.5.4

