protected function TimestampFormatterTest::renderEntityFields in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php \Drupal\Tests\field\Kernel\Timestamp\TimestampFormatterTest::renderEntityFields()
- 9 core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php \Drupal\Tests\field\Kernel\Timestamp\TimestampFormatterTest::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.
2 calls to TimestampFormatterTest::renderEntityFields()
- TimestampFormatterTest::testTimestampAgoFormatter in core/
modules/ field/ tests/ src/ Kernel/ Timestamp/ TimestampFormatterTest.php - Tests TimestampAgoFormatter.
- TimestampFormatterTest::testTimestampFormatter in core/
modules/ field/ tests/ src/ Kernel/ Timestamp/ TimestampFormatterTest.php - Tests TimestampFormatter.
File
- core/
modules/ field/ tests/ src/ Kernel/ Timestamp/ TimestampFormatterTest.php, line 99
Class
- TimestampFormatterTest
- Tests the timestamp formatters.
Namespace
Drupal\Tests\field\Kernel\TimestampCode
protected function renderEntityFields(FieldableEntityInterface $entity, EntityViewDisplayInterface $display) {
$content = $display
->build($entity);
$content = $this
->render($content);
return $content;
}