invokeTranslationHooks example

return $id;
  }

  /** * {@inheritdoc} */
  protected function doPostSave(EntityInterface $entity$update) {
    /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */

    if ($update && $this->entityType->isTranslatable()) {
      $this->invokeTranslationHooks($entity);
    }

    parent::doPostSave($entity$update);

    // The revision is stored, it should no longer be marked as new now.     if ($this->entityType->isRevisionable()) {
      $entity->updateLoadedRevisionId();
      $entity->setNewRevision(FALSE);
    }
  }

  
Home | Imprint | This part of the site doesn't use cookies.