summaryrefslogtreecommitdiff
path: root/modules/field/field.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/field/field.module')
-rw-r--r--modules/field/field.module22
1 files changed, 13 insertions, 9 deletions
diff --git a/modules/field/field.module b/modules/field/field.module
index 9e03c8d91..af9e8c835 100644
--- a/modules/field/field.module
+++ b/modules/field/field.module
@@ -445,7 +445,7 @@ function field_associate_fields($module) {
* Helper function to get the default value for a field on an entity.
*
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $entity
* The entity for the operation.
* @param $field
@@ -569,7 +569,7 @@ function _field_sort_items_value_helper($a, $b) {
* @endcode
*
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $bundle
* The bundle name.
* @param $settings
@@ -674,7 +674,7 @@ function field_get_display($instance, $view_mode, $entity) {
* Returns the display settings to use for pseudo-fields in a given view mode.
*
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $bundle
* The bundle name.
* @param $view_mode
@@ -773,7 +773,7 @@ function _field_filter_xss_display_allowed_tags() {
* Returns a renderable array for a single field value.
*
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $entity
* The entity containing the field to display. Must at least contain the id
* key and the field data to display.
@@ -825,12 +825,14 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display =
* render($content[FIELD_NAME]) instead.
* - Do not use to display all fields in an entity, use
* field_attach_prepare_view() and field_attach_view() instead.
+ * - The field_view_value() function can be used to output a single formatted
+ * field value, without label or wrapping field markup.
*
* The function takes care of invoking the prepare_view steps. It also respects
* field access permissions.
*
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $entity
* The entity containing the field to display. Must at least contain the id
* key and the field data to display.
@@ -864,6 +866,8 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display =
* used.
* @return
* A renderable array for the field value.
+ *
+ * @see field_view_value()
*/
function field_view_field($entity_type, $entity, $field_name, $display = array(), $langcode = NULL) {
$output = array();
@@ -917,7 +921,7 @@ function field_view_field($entity_type, $entity, $field_name, $display = array()
* Returns the field items in the language they currently would be displayed.
*
* @param $entity_type
- * The type of $entity.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $entity
* The entity containing the data to be displayed.
* @param $field_name
@@ -961,7 +965,7 @@ function field_has_data($field) {
* @param $field
* The field on which the operation is to be performed.
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $entity
* (optional) The entity for the operation.
* @param $account
@@ -991,7 +995,7 @@ function field_access($op, $field, $entity_type, $entity = NULL, $account = NULL
* Helper function to extract the bundle name of from a bundle object.
*
* @param $entity_type
- * The type of $entity; e.g. 'node' or 'user'.
+ * The type of $entity; e.g., 'node' or 'user'.
* @param $bundle
* The bundle object (or string if bundles for this entity type do not exist
* as standalone objects).
@@ -1136,7 +1140,7 @@ function template_process_field(&$variables, $hook) {
* - label_hidden: A boolean indicating to show or hide the field label.
* - title_attributes: A string containing the attributes for the title.
* - label: The label for the field.
- * - content_attributes: A string containing the attaributes for the content's
+ * - content_attributes: A string containing the attributes for the content's
* div.
* - items: An array of field items.
* - item_attributes: An array of attributes for each item.