From af4a31b82d9fabfaf7931f84d07fa9cee9e759b7 Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 21 Jun 2011 22:56:45 -0700 Subject: [PATCH] Issue #1190928 by droplet: Add examples of entity type in field_get_items() (and fix punctuation in other examples). --- modules/field/field.api.php | 10 +++++----- modules/field/field.module | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/field/field.api.php b/modules/field/field.api.php index fae598d928d..ba44c735667 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -2136,7 +2136,7 @@ function hook_field_info_max_weight($entity_type, $bundle, $context) { * found in the 'display' key of $instance definitions. * @param $context * An associative array containing: - * - entity_type: The entity type; e.g. 'node' or 'user'. + * - entity_type: The entity type; e.g., 'node' or 'user'. * - field: The field being rendered. * - instance: The instance being rendered. * - entity: The entity being rendered. @@ -2171,7 +2171,7 @@ function hook_field_display_alter(&$display, $context) { * found in the 'display' key of $instance definitions. * @param $context * An associative array containing: - * - entity_type: The entity type; e.g. 'node' or 'user'. + * - entity_type: The entity type; e.g., 'node' or 'user'. * - field: The field being rendered. * - instance: The instance being rendered. * - entity: The entity being rendered. @@ -2198,7 +2198,7 @@ function hook_field_display_ENTITY_TYPE_alter(&$display, $context) { * by pseudo-field names. * @param $context * An associative array containing: - * - entity_type: The entity type; e.g. 'node' or 'user'. + * - entity_type: The entity type; e.g., 'node' or 'user'. * - bundle: The bundle name. * - view_mode: The view mode, e.g. 'full', 'teaser'... */ @@ -2224,7 +2224,7 @@ function hook_field_extra_fields_display_alter(&$displays, $context) { * The instance's widget properties. * @param $context * An associative array containing: - * - entity_type: The entity type; e.g. 'node' or 'user'. + * - entity_type: The entity type; e.g., 'node' or 'user'. * - entity: The entity object. * - field: The field that the widget belongs to. * - instance: The instance of the field. @@ -2256,7 +2256,7 @@ function hook_field_widget_properties_alter(&$widget, $context) { * The instance's widget properties. * @param $context * An associative array containing: - * - entity_type: The entity type; e.g. 'node' or 'user'. + * - entity_type: The entity type; e.g., 'node' or 'user'. * - entity: The entity object. * - field: The field that the widget belongs to. * - instance: The instance of the field. diff --git a/modules/field/field.module b/modules/field/field.module index b808e595691..af9e8c8355a 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. @@ -832,7 +832,7 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display = * 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. @@ -921,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 @@ -965,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 @@ -995,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).