class EntityTestTranslationController

Test entity translation controller.

Hierarchy

Expanded class hierarchy of EntityTestTranslationController

File

drupal/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestTranslationController.php, line 16
Definition of Drupal\translation_entity\EntityTranslationController.

Namespace

Drupal\entity_test
View source
class EntityTestTranslationController extends EntityTranslationController {

  /**
   * Overrides EntityTranslationControllerInterface::removeTranslation().
   */
  public function removeTranslation(EntityInterface $entity, $langcode) {
    $translation = $entity
      ->getTranslation($langcode);
    foreach ($translation
      ->getPropertyDefinitions() as $property_name => $langcode) {
      $translation->{$property_name} = array();
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityTestTranslationController::removeTranslation public function Overrides EntityTranslationControllerInterface::removeTranslation(). Overrides EntityTranslationController::removeTranslation
EntityTranslationController::$entityInfo protected property The entity info of the entity being translated.
EntityTranslationController::$entityType protected property The type of the entity being translated.
EntityTranslationController::addTranslatabilityClue protected function Adds a clue about the form element translatability.
EntityTranslationController::entityFormAlter public function Implements EntityTranslationControllerInterface::entityFormAlter(). Overrides EntityTranslationControllerInterface::entityFormAlter 3
EntityTranslationController::entityFormDelete function Form submission handler for EntityTranslationController::entityFormAlter().
EntityTranslationController::entityFormDeleteTranslation function Form submission handler for EntityTranslationController::entityFormAlter().
EntityTranslationController::entityFormEntityBuild public function Entity builder method.
EntityTranslationController::entityFormSharedElements public function Process callback: Determines which elements get clue in the form.
EntityTranslationController::entityFormSourceChange public function Form submission handler for EntityTranslationController::entityFormAlter().
EntityTranslationController::entityFormTitle protected function Returns the title to be used for the entity form page. 2
EntityTranslationController::getAccess public function Implements EntityTranslationControllerInterface::getAccess(). Overrides EntityTranslationControllerInterface::getAccess 1
EntityTranslationController::getBasePath public function Implements EntityTranslationControllerInterface::getBasePath(). Overrides EntityTranslationControllerInterface::getBasePath
EntityTranslationController::getEditPath public function Implements EntityTranslationControllerInterface::getEditPath(). Overrides EntityTranslationControllerInterface::getEditPath
EntityTranslationController::getPathInstance protected function Returns an instance of the given path.
EntityTranslationController::getSourceLangcode public function Implements EntityTranslationControllerInterface::getSourceLanguage(). Overrides EntityTranslationControllerInterface::getSourceLangcode
EntityTranslationController::getTranslationAccess public function Implements EntityTranslationControllerInterface::getTranslationAccess(). Overrides EntityTranslationControllerInterface::getTranslationAccess
EntityTranslationController::getViewPath public function Implements EntityTranslationControllerInterface::getViewPath(). Overrides EntityTranslationControllerInterface::getViewPath
EntityTranslationController::retranslate public function Implements EntityTranslationControllerInterface::retranslate(). Overrides EntityTranslationControllerInterface::retranslate
EntityTranslationController::__construct public function Initializes an instance of the entity translation controller.