You are here

protected function EntityRenderHandlerTest::getRenderedEntities in Acquia Lift Connector 8.4

Returns the rendered entities from the cdf list.

Parameters

\Acquia\ContentHubClient\CDF\CDFObject[] $cdfs: The cdf list.

Return value

\Acquia\ContentHubClient\CDF\CDFObject[] A set of rendered entities.

4 calls to EntityRenderHandlerTest::getRenderedEntities()
EntityRenderHandlerTest::assertCdfNotHasRenderedEntity in modules/acquia_lift_publisher/tests/src/Kernel/EventSubscriber/Cdf/EntityRenderHandlerTest.php
Asserts that cdf list doesn't have a rendered entity.
EntityRenderHandlerTest::testImageAttributeIsSet in modules/acquia_lift_publisher/tests/src/Kernel/EventSubscriber/Cdf/EntityRenderHandlerTest.php
@covers ::onCreateCdf
EntityRenderHandlerTest::testOnCreateCdfBlockContent in modules/acquia_lift_publisher/tests/src/Kernel/EventSubscriber/Cdf/EntityRenderHandlerTest.php
@covers ::onCreateCdf
EntityRenderHandlerTest::testOnCreateCdfMetadataSetCorrectly in modules/acquia_lift_publisher/tests/src/Kernel/EventSubscriber/Cdf/EntityRenderHandlerTest.php
@covers ::onCreateCdf

File

modules/acquia_lift_publisher/tests/src/Kernel/EventSubscriber/Cdf/EntityRenderHandlerTest.php, line 370

Class

EntityRenderHandlerTest
Class EntityRenderHandlerTest.

Namespace

Drupal\Tests\acquia_lift_publisher\Kernel\EventSubscriber\Cdf

Code

protected function getRenderedEntities(array $cdfs) : array {
  $rendered_entities = [];
  foreach ($cdfs as $cdf) {
    if ($cdf
      ->getType() === 'rendered_entity') {
      $rendered_entities[] = $cdf;
    }
  }
  return $rendered_entities;
}