You are here

protected function UserNameFormatterTest::renderEntityFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Tests/Field/UserNameFormatterTest.php \Drupal\user\Tests\Field\UserNameFormatterTest::renderEntityFields()

Renders fields of a given entity with a given display.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity object with attached fields to render.

\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The display to render the fields in.

Return value

string The rendered entity fields.

File

core/modules/user/src/Tests/Field/UserNameFormatterTest.php, line 70
Contains \Drupal\user\Tests\Field\UserNameFormatterTest.

Class

UserNameFormatterTest
Tests the user_name formatter.

Namespace

Drupal\user\Tests\Field

Code

protected function renderEntityFields(FieldableEntityInterface $entity, EntityViewDisplayInterface $display) {
  $content = $display
    ->build($entity);
  $content = $this
    ->render($content);
  return $content;
}