function field_get_items

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 field.module field_get_items($entity_type, $entity, $field_name, $langcode = NULL)
cle7 field.module field_get_items($entity_type, $entity, $field_name, $langcode = NULL)
elmsmedia7 field.module field_get_items($entity_type, $entity, $field_name, $langcode = NULL)
icor7 field.module field_get_items($entity_type, $entity, $field_name, $langcode = NULL)
meedjum_blog7 field.module field_get_items($entity_type, $entity, $field_name, $langcode = NULL)
mooc7 field.module field_get_items($entity_type, $entity, $field_name, $langcode = NULL)

Returns the field items in the language they currently would be displayed.

Parameters

$entity_type: The type of $entity; e.g., 'node' or 'user'.

$entity: The entity containing the data to be displayed.

$field_name: The field to be displayed.

$langcode: (optional) The language code $entity->{$field_name} has to be displayed in. Defaults to the current language.

Return value

An array of field items keyed by delta if available, FALSE otherwise.

Related topics

21 calls to field_get_items()
comment_admin_overview in modules/comment/comment.admin.inc
Form builder for the comment overview administration form.
comment_preview in modules/comment/comment.module
Generate a comment preview.
comment_tokens in modules/comment/comment.tokens.inc
Implements hook_tokens().
context_condition_node_taxonomy::execute in sites/all/modules/ulmus/context/plugins/context_condition_node_taxonomy.inc
ctools_entity_field_content_type_render in sites/all/modules/ulmus/ctools/plugins/content_types/entity_context/entity_field.inc
Render the custom content type.

... See full list

File

modules/field/field.module, line 935
Attach custom data fields to Drupal entities.

Code

function field_get_items($entity_type, $entity, $field_name, $langcode = NULL) {
  $langcode = field_language($entity_type, $entity, $field_name, $langcode);
  return isset($entity->{$field_name}[$langcode]) ? $entity->{$field_name}[$langcode] : FALSE;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.