Browse Source

Fix documentation for drupal_field() function

merge-requests/4/head
Chi 6 years ago
parent
commit
5ab80a4c36
  1. 5
      src/TwigExtension.php

5
src/TwigExtension.php

@ -327,12 +327,11 @@ class TwigExtension extends \Twig_Extension {
/** /**
* Returns the render array for a single entity field. * Returns the render array for a single entity field.
* *
* This works very much like drupal_entity() except it prints only one
* specific field.
*
* Example: * Example:
* @code * @code
* {{ drupal_field('field_image', 'node', 1) }} * {{ drupal_field('field_image', 'node', 1) }}
* {{ drupal_field('field_image', 'node', 1, 'teaser') }}
* {{ drupal_field('field_image', 'node', 1, {type: 'image_url', settings: {image_style: 'large'}}) }}
* @endcode * @endcode
* *
* @param string $field_name * @param string $field_name

Loading…
Cancel
Save