diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 720c3ad..52c716f 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -148,9 +148,17 @@ class EntityType extends Plugin { public $translatable = FALSE; /** - * @todo content_translation_entity_info_alter() uses this but it is undocumented. + * Used to mark the entity type as translatable. + * + * This was used to register field translation handlers and thus mark the + * entity type as translatable. Additionally it could be used to provide + * translation-handler specific data. * * @var array + * + * @deprecated The entire concept of field translation handler has been + * removed. This will no longer be used. Use the "translatable" property + * instead. */ public $translation = array(); @@ -228,6 +236,9 @@ class EntityType extends Plugin { * to the entity UI in a generic fashion. * * @var string (optional) + * + * @deprecated Define the "canonical" URI for the entity through the "links" + * property instead. */ public $menu_base_path; diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php index f840e87..d9d50c9 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php @@ -22,18 +22,15 @@ * To make Content Translation automatically support an entity type some keys * may need to be defined, but none of them is required unless the entity path * is different from ENTITY_TYPE/%ENTITY_TYPE (e.g. taxonomy/term/1), in which - * case at least the 'menu_base_path' key must be defined. - * - * The menu base path is also used to reliably alter menu router information to - * provide the translation overview page for any entity. - * If the entity uses a menu loader different from %ENTITY_TYPE also the 'menu - * path wildcard' info key needs to be defined. + * case at least the 'canonical' key in the 'links' entity info property must be + * defined. * * Every entity type needs a translation controller to be translated. This can * be specified through the "controllers['translation']" key in the entity * info. If an entity type is enabled for translation and no translation - * controller is defined, Drupal\content_translation\ContentTranslationController - * will be assumed. Every translation controller class must implement + * controller is defined, + * Drupal\content_translation\ContentTranslationController will be assumed. + * Every translation controller class must implement * Drupal\content_translation\ContentTranslationControllerInterface. * * If the entity paths match the default patterns above and there is no need for @@ -41,32 +38,6 @@ * provide built-in support for the entity. It will still be required to enable * translation for each translatable bundle. * - * Additionally some more entity info keys can be defined to further customize - * the translation UI. The content translation info is an associative array that - * has to match the following structure. Two nested arrays keyed respectively - * by the 'translation' key and the 'content_translation' key. Elements: - * - access callback: The access callback for the translation pages. Defaults to - * 'entity_translation_translate_access'. - * - access arguments: The access arguments for the translation pages. By - * default only the entity object is passed to the access callback. - * - * This is how entity info would look for a module defining a new translatable - * entity type: - * @code - * function mymodule_entity_info_alter(array &$info) { - * $info['myentity'] += array( - * 'menu_base_path' => 'mymodule/myentity/%my_entity_loader', - * 'translation' => array( - * 'content_translation' => array( - * 'access_callback' => 'mymodule_myentity_translate_access', - * 'access_arguments' => array(2), - * ), - * ), - * ); - * $info['myentity']['controllers'] += array('translation' => 'Drupal\mymodule\MyContentTranslationController'); - * } - * @endcode - * * @see \Drupal\Core\Entity\EntityManager */ interface ContentTranslationControllerInterface {