function lingotek_entity_type_alter in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8 lingotek.module \lingotek_entity_type_alter()
- 8.2 lingotek.module \lingotek_entity_type_alter()
- 4.0.x lingotek.module \lingotek_entity_type_alter()
- 3.0.x lingotek.module \lingotek_entity_type_alter()
- 3.1.x lingotek.module \lingotek_entity_type_alter()
- 3.2.x lingotek.module \lingotek_entity_type_alter()
- 3.3.x lingotek.module \lingotek_entity_type_alter()
- 3.5.x lingotek.module \lingotek_entity_type_alter()
- 3.6.x lingotek.module \lingotek_entity_type_alter()
- 3.7.x lingotek.module \lingotek_entity_type_alter()
- 3.8.x lingotek.module \lingotek_entity_type_alter()
Implements hook_entity_type_alter().
File
- ./
lingotek.module, line 578 - Implements Drupal-related hooks for the Lingotek Translation module.
Code
function lingotek_entity_type_alter(array &$entity_types) {
// Provide defaults for lingotek translation info.
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
foreach ($entity_types as $entity_type) {
if ($entity_type
->isTranslatable()) {
if (!$entity_type
->hasHandlerClass('lingotek')) {
$entity_type
->setHandlerClass('lingotek', 'Drupal\\lingotek\\LingotekContentTranslationHandler');
}
}
}
}