You are here

protected function LingotekSourceStatusFormatterTest::renderEntityFields in Lingotek Translation 3.7.x

Same name and namespace in other branches
  1. 8.2 src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  2. 4.0.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  3. 3.0.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  4. 3.1.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  5. 3.2.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  6. 3.3.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  7. 3.4.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  8. 3.5.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  9. 3.6.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::renderEntityFields()
  10. 3.8.x src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php \Drupal\lingotek\Tests\Kernel\FieldFormatters\LingotekSourceStatusFormatterTest::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.

1 call to LingotekSourceStatusFormatterTest::renderEntityFields()
LingotekSourceStatusFormatterTest::testLingotekSourceStatusFormatter in src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php
Tests LingotekSourceStatusFormatter.

File

src/Tests/Kernel/FieldFormatters/LingotekSourceStatusFormatterTest.php, line 105

Class

LingotekSourceStatusFormatterTest
Tests the Lingotek source status formatter.

Namespace

Drupal\lingotek\Tests\Kernel\FieldFormatters

Code

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