You are here

function lingotek_cohesion_test_entity_type_build in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.3.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module \lingotek_cohesion_test_entity_type_build()
  2. 3.4.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module \lingotek_cohesion_test_entity_type_build()
  3. 3.5.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module \lingotek_cohesion_test_entity_type_build()
  4. 3.6.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module \lingotek_cohesion_test_entity_type_build()
  5. 3.7.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module \lingotek_cohesion_test_entity_type_build()
  6. 3.8.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module \lingotek_cohesion_test_entity_type_build()

Implements hook_entity_type_build().

Replace the entity class so we can override the output of twig.

File

tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.module, line 13
Provides the foundations for testing Cohesion without having it installed.

Code

function lingotek_cohesion_test_entity_type_build(&$entity_types) {
  if (isset($entity_types['cohesion_layout'])) {
    $entity_types['cohesion_layout']
      ->setClass('Drupal\\lingotek_cohesion_test\\Entity\\TestCohesionLayout');
  }
}