You are here

public function LingotekContentTranslationHandler::getFieldDefinitions in Lingotek Translation 3.0.x

Same name and namespace in other branches
  1. 8 src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  2. 8.2 src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  3. 4.0.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  4. 3.1.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  5. 3.2.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  6. 3.3.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  7. 3.4.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  8. 3.5.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  9. 3.6.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  10. 3.7.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()
  11. 3.8.x src/LingotekContentTranslationHandler.php \Drupal\lingotek\LingotekContentTranslationHandler::getFieldDefinitions()

Overrides LingotekContentTranslationHandlerInterface::getFieldDefinitions

File

src/LingotekContentTranslationHandler.php, line 74

Class

LingotekContentTranslationHandler

Namespace

Drupal\lingotek

Code

public function getFieldDefinitions() {
  $definitions = [];
  $definitions['lingotek_metadata'] = BaseFieldDefinition::create('entity_reference')
    ->setLabel(t('Lingotek metadata'))
    ->setComputed(TRUE)
    ->setClass(LingotekContentMetadataFieldItemList::class)
    ->setDescription(t('The Lingotek profile defining this translation.'))
    ->setSetting('target_type', 'lingotek_content_metadata')
    ->setDisplayConfigurable('form', FALSE)
    ->setDisplayConfigurable('view', FALSE)
    ->setReadOnly(FALSE);
  return $definitions;
}