Skip to content
Snippets Groups Projects
Commit 3588d097 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1017850 by yched: Improve documentation for field_view_value().

parent 4b5dfbc3
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -825,6 +825,8 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display = ...@@ -825,6 +825,8 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display =
* render($content[FIELD_NAME]) instead. * render($content[FIELD_NAME]) instead.
* - Do not use to display all fields in an entity, use * - Do not use to display all fields in an entity, use
* field_attach_prepare_view() and field_attach_view() instead. * 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 * The function takes care of invoking the prepare_view steps. It also respects
* field access permissions. * field access permissions.
...@@ -864,6 +866,8 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display = ...@@ -864,6 +866,8 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display =
* used. * used.
* @return * @return
* A renderable array for the field value. * A renderable array for the field value.
*
* @see field_view_value()
*/ */
function field_view_field($entity_type, $entity, $field_name, $display = array(), $langcode = NULL) { function field_view_field($entity_type, $entity, $field_name, $display = array(), $langcode = NULL) {
$output = array(); $output = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment