interface ContentTranslationManagerInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/content_translation/src/ContentTranslationManagerInterface.php \Drupal\content_translation\ContentTranslationManagerInterface
Provides an interface for common functionality for content translation.
Hierarchy
- interface \Drupal\content_translation\ContentTranslationManagerInterface
Expanded class hierarchy of ContentTranslationManagerInterface
All classes that implement ContentTranslationManagerInterface
4 files declare their use of ContentTranslationManagerInterface
- ContentTranslationContextualLinks.php in core/modules/ content_translation/ src/ Plugin/ Derivative/ ContentTranslationContextualLinks.php 
- Contains \Drupal\content_translation\Plugin\Derivative\ContentTranslationContextualLinks.
- ContentTranslationController.php in core/modules/ content_translation/ src/ Controller/ ContentTranslationController.php 
- Contains \Drupal\content_translation\Controller\ContentTranslationController.
- ContentTranslationLocalTasks.php in core/modules/ content_translation/ src/ Plugin/ Derivative/ ContentTranslationLocalTasks.php 
- Contains \Drupal\content_translation\Plugin\Derivative\ContentTranslationLocalTasks.
- ContentTranslationRouteSubscriber.php in core/modules/ content_translation/ src/ Routing/ ContentTranslationRouteSubscriber.php 
- Contains \Drupal\content_translation\Routing\ContentTranslationRouteSubscriber.
File
- core/modules/ content_translation/ src/ ContentTranslationManagerInterface.php, line 15 
- Contains \Drupal\content_translation\ContentTranslationManagerInterface.
Namespace
Drupal\content_translationView source
interface ContentTranslationManagerInterface {
  /**
   * Gets the entity types that support content translation.
   *
   * @return \Drupal\Core\Entity\EntityTypeInterface[]
   *   An array of entity types that support content translation.
   */
  public function getSupportedEntityTypes();
  /**
   * Checks whether an entity type supports translation.
   *
   * @param string $entity_type_id
   *   The entity type.
   *
   * @return bool
   *   TRUE if an entity type is supported, FALSE otherwise.
   */
  public function isSupported($entity_type_id);
  /**
   * Returns an instance of the Content translation handler.
   *
   * @param string $entity_type_id
   *   The type of the entity being translated.
   *
   * @return \Drupal\content_translation\ContentTranslationHandlerInterface
   *   An instance of the content translation handler.
   */
  public function getTranslationHandler($entity_type_id);
  /**
   * Returns an instance of the Content translation metadata.
   *
   * @param \Drupal\Core\Entity\EntityInterface $translation
   *   The entity translation whose metadata needs to be retrieved.
   *
   * @return \Drupal\content_translation\ContentTranslationMetadataWrapperInterface
   *   An instance of the content translation metadata.
   */
  public function getTranslationMetadata(EntityInterface $translation);
  /**
   * Sets the value for translatability of the given entity type bundle.
   *
   * @param string $entity_type_id
   *   The entity type.
   * @param string $bundle
   *   The bundle of the entity.
   * @param bool $value
   *   The boolean value we need to save.
   */
  public function setEnabled($entity_type_id, $bundle, $value);
  /**
   * Determines whether the given entity type is translatable.
   *
   * @param string $entity_type_id
   *   The type of the entity.
   * @param string $bundle
   *   (optional) The bundle of the entity. If no bundle is provided, all the
   *   available bundles are checked.
   *
   * @returns bool
   *   TRUE if the specified bundle is translatable. If no bundle is provided
   *   returns TRUE if at least one of the entity bundles is translatable.
   *
   */
  public function isEnabled($entity_type_id, $bundle = NULL);
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| ContentTranslationManagerInterface:: | public | function | Gets the entity types that support content translation. | 1 | 
| ContentTranslationManagerInterface:: | public | function | Returns an instance of the Content translation handler. | 1 | 
| ContentTranslationManagerInterface:: | public | function | Returns an instance of the Content translation metadata. | 1 | 
| ContentTranslationManagerInterface:: | public | function | Determines whether the given entity type is translatable. | 1 | 
| ContentTranslationManagerInterface:: | public | function | Checks whether an entity type supports translation. | 1 | 
| ContentTranslationManagerInterface:: | public | function | Sets the value for translatability of the given entity type bundle. | 1 | 
