class Translator in Translation Management Tool 8
Same name in this branch
- 8 src/Entity/Translator.php \Drupal\tmgmt\Entity\Translator
- 8 src/Plugin/views/field/Translator.php \Drupal\tmgmt\Plugin\views\field\Translator
Entity class for the tmgmt_translator entity.
For disambiguation, The UI uses the term "Provider" for a translator.
Plugin annotation
@ConfigEntityType(
id = "tmgmt_translator",
label = @Translation("Provider"),
handlers = {
"form" = {
"edit" = "Drupal\tmgmt\Form\TranslatorForm",
"add" = "Drupal\tmgmt\Form\TranslatorForm",
"delete" = "\Drupal\Core\Entity\EntityDeleteForm",
"clone" = "Drupal\tmgmt\Form\TranslatorForm",
},
"list_builder" = "Drupal\tmgmt\Entity\ListBuilder\TranslatorListBuilder",
"access" = "Drupal\tmgmt\Entity\Controller\TranslatorAccessControlHandler",
},
uri_callback = "tmgmt_translator_uri",
config_prefix = "translator",
entity_keys = {
"id" = "name",
"label" = "label",
"weight" = "weight",
},
config_export = {
"name",
"label",
"description",
"auto_accept",
"weight",
"plugin",
"settings",
"remote_languages_mappings",
},
links = {
"collection" = "/admin/tmgmt/translators",
"edit-form" = "/admin/tmgmt/translator/manage/{tmgmt_translator}",
"add-form" = "/admin/tmgmt/translators/add",
"delete-form" = "/admin/tmgmt/translators/manage/{tmgmt_translator}/delete",
"clone-form" = "/admin/tmgmt/translators/manage/{tmgmt_translator}/clone",
}
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
- class \Drupal\tmgmt\Entity\Translator implements TranslatorInterface
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
Expanded class hierarchy of Translator
Related topics
15 files declare their use of Translator
- ContentEntitySourceUnitTest.php in sources/
content/ tests/ src/ Kernel/ ContentEntitySourceUnitTest.php - ContentTmgmtEntitySourceUiTest.php in sources/
content/ tests/ src/ Functional/ ContentTmgmtEntitySourceUiTest.php - CrudTest.php in tests/
src/ Kernel/ CrudTest.php - FileTranslatorTest.php in translators/
tmgmt_file/ tests/ src/ Functional/ FileTranslatorTest.php - LocalTranslatorPreviewTest.php in translators/
tmgmt_local/ tests/ src/ Functional/ LocalTranslatorPreviewTest.php
File
- src/
Entity/ Translator.php, line 60
Namespace
Drupal\tmgmt\EntityView source
class Translator extends ConfigEntityBase implements TranslatorInterface {
/**
* Machine readable name of the translator.
*
* @var string
*/
protected $name;
/**
* The UUID of this translator.
*
* @var string
*/
protected $uuid;
/**
* Label of the translator.
*
* @var string
*/
protected $label;
/**
* Description of the translator.
*
* @var string
*/
protected $description;
/**
* Weight of the translator.
*
* @var int
*/
protected $weight;
/**
* Plugin name of the translator.
*
* @type string
*/
protected $plugin;
/**
* Translator type specific settings.
*
* @var array
*/
protected $settings = array();
/**
* Whether to skip reviewing process and auto accepting translation.
*
* @var bool
*/
protected $auto_accept;
/**
* The supported target languages caches.
*
* @var array
*/
protected $languageCache;
/**
* The supported language pairs caches.
*
* @var array
*/
protected $languagePairsCache;
/**
* The supported remote languages caches.
*
* @var array
*/
protected $remoteLanguages = [];
/**
* Whether the language cache in the database is outdated.
*
* @var bool
*/
protected $languageCacheOutdated;
/**
* The remote languages mappings.
*
* @var array
*/
protected $remote_languages_mappings = array();
/**
* {@inheritdoc}
*/
public function id() {
return $this->name;
}
/**
* {@inheritdoc}
*/
public function getSettings() {
return $this->settings;
}
/**
* {@inheritdoc}
*/
public function setSettings(array $settings) {
$this->settings = $settings;
return $this;
}
/**
* {@inheritdoc}
*/
public function getSetting($name) {
if (is_array($name)) {
if (NestedArray::keyExists($this->settings, $name)) {
return NestedArray::getValue($this->settings, $name);
}
elseif ($plugin = $this
->getPlugin()) {
$defaults = $plugin
->defaultSettings();
return NestedArray::getValue($defaults, $name);
}
}
else {
if (isset($this->settings[$name])) {
return $this->settings[$name];
}
elseif ($plugin = $this
->getPlugin()) {
$defaults = $plugin
->defaultSettings();
if (isset($defaults[$name])) {
return $defaults[$name];
}
}
}
}
/**
* {@inheritdoc}
*/
public function setSetting($setting_name, $value) {
NestedArray::setValue($this->settings, (array) $setting_name, $value);
return $this;
}
/**
* {@inheritdoc}
*/
public function isAutoAccept() {
return $this->auto_accept;
}
/**
* {@inheritdoc}
*/
public function setAutoAccept($value) {
$this->auto_accept = $value;
return $this;
}
/**
* {@inheritdoc}
*/
public function getPluginId() {
return $this->plugin;
}
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this->description;
}
/**
* {@inheritdoc}
*/
public function setPluginID($plugin_id) {
$this->plugin = $plugin_id;
}
/**
* {@inheritdoc}
*/
public static function preDelete(EntityStorageInterface $storage, array $entities) {
// We are never going to have many entities here, so we can risk a loop.
foreach ($entities as $key => $name) {
// Find active jobs associated with the translator that is being deleted.
$job_ids = \Drupal::entityQuery('tmgmt_job')
->condition('state', [
Job::STATE_ACTIVE,
Job::STATE_CONTINUOUS,
Job::STATE_UNPROCESSED,
], 'IN')
->condition('translator', $key)
->execute();
$jobs = Job::loadMultiple($job_ids);
/** @var \Drupal\tmgmt\JobInterface $job */
foreach ($jobs as $job) {
$job
->aborted('Job has been aborted because the translation provider %provider was deleted.', [
'%provider' => $job
->getTranslatorLabel(),
]);
}
}
parent::preDelete($storage, $entities);
}
/**
* {@inheritdoc}
*/
public function getPlugin() {
return \Drupal::service('plugin.manager.tmgmt.translator')
->createInstance($this->plugin);
}
/**
* {@inheritdoc}
*/
public function hasPlugin() {
if (!empty($this->plugin) && \Drupal::service('plugin.manager.tmgmt.translator')
->hasDefinition($this->plugin)) {
return TRUE;
}
return FALSE;
}
/**
* {@inheritdoc}
*/
public function getSupportedTargetLanguages($source_language) {
if ($plugin = $this
->getPlugin()) {
$info = $plugin
->getPluginDefinition();
if (isset($info['language_cache']) && empty($info['language_cache'])) {
// This plugin doesn't support language caching.
return $this
->mapToLocalLanguages($plugin
->getSupportedTargetLanguages($this, $this
->mapToRemoteLanguage($source_language)));
}
else {
// Retrieve the supported languages from the cache.
if (empty($this->languageCache) && ($cache = \Drupal::cache('data')
->get('tmgmt_languages:' . $this->name))) {
$this->languageCache = $cache->data;
}
// Even if we successfully queried the cache it might not have an entry
// for our source language yet.
if (!isset($this->languageCache[$source_language])) {
$local_languages = $this
->mapToLocalLanguages($plugin
->getSupportedTargetLanguages($this, $this
->mapToRemoteLanguage($source_language)));
if (empty($local_languages)) {
return [];
}
$this->languageCache[$source_language] = $local_languages;
$this
->updateCache();
}
}
return $this->languageCache[$source_language];
}
}
/**
* {@inheritdoc}
*/
public function getSupportedLanguagePairs() {
if ($plugin = $this
->getPlugin()) {
$info = $plugin
->getPluginDefinition();
if (isset($info['language_cache']) && empty($info['language_cache'])) {
// This plugin doesn't support language caching.
return $plugin
->getSupportedLanguagePairs($this);
}
else {
// Retrieve the supported languages from the cache.
if (empty($this->languagePairsCache) && ($cache = \Drupal::cache('data')
->get('tmgmt_language_pairs:' . $this->name))) {
$this->languagePairsCache = $cache->data;
}
// Even if we successfully queried the cache data might not be yet
// available.
if (empty($this->languagePairsCache)) {
$this->languagePairsCache = $plugin
->getSupportedLanguagePairs($this);
$this
->updateCache();
}
}
return $this->languagePairsCache;
}
}
/**
* {@inheritdoc}
*/
public function getSupportedRemoteLanguages() {
if ($plugin = $this
->getPlugin()) {
if (empty($this->remoteLanguages) && ($cache = \Drupal::cache('data')
->get('tmgmt_remote_languages:' . $this->name))) {
$this->remoteLanguages = $cache->data;
}
if (empty($this->remoteLanguages)) {
$this->remoteLanguages = $plugin
->getSupportedRemoteLanguages($this);
$info = $plugin
->getPluginDefinition();
if (!isset($info['language_cache']) || !empty($info['language_cache'])) {
\Drupal::cache('data')
->set('tmgmt_remote_languages:' . $this->name, $this->remoteLanguages, Cache::PERMANENT, $this
->getCacheTags());
}
}
}
return $this->remoteLanguages;
}
/**
* {@inheritdoc}
*/
public function clearLanguageCache() {
$this->languageCache = array();
\Drupal::cache('data')
->delete('tmgmt_languages:' . $this->name);
\Drupal::cache('data')
->delete('tmgmt_language_pairs:' . $this->name);
\Drupal::cache('data')
->delete('tmgmt_remote_languages:' . $this->name);
}
/**
* {@inheritdoc}
*/
public function checkTranslatable(JobInterface $job) {
if ($plugin = $this
->getPlugin()) {
return $plugin
->checkTranslatable($this, $job);
}
return TranslatableResult::no(t('Missing provider plugin'));
}
/**
* {@inheritdoc}
*/
public function checkAvailable() {
if ($plugin = $this
->getPlugin()) {
return $plugin
->checkAvailable($this);
}
return AvailableResult::no(t('@translator is not available. Make sure it is properly <a href=:configured>configured</a>.', [
'@translator' => $this
->label(),
':configured' => $this
->toUrl()
->toString(),
]));
}
/**
* {@inheritdoc}
*/
public function hasCheckoutSettings(JobInterface $job) {
if ($plugin = $this
->getPlugin()) {
return $plugin
->hasCheckoutSettings($job);
}
return FALSE;
}
/**
* {@inheritdoc}
*/
public function getRemoteLanguagesMappings() {
$remote_languages_mappings = [];
foreach (\Drupal::languageManager()
->getLanguages() as $language => $info) {
$remote_languages_mappings[$language] = $this
->mapToRemoteLanguage($language);
}
return $remote_languages_mappings;
}
/**
* {@inheritdoc}
*/
public function mapToLocalLanguages(array $remote_languages) {
$local_languages = array();
$remote_mappings = $this
->getPlugin()
->getDefaultRemoteLanguagesMappings();
foreach ($remote_languages as $language => $info) {
if (in_array($language, $remote_mappings)) {
$local_language = array_search($language, $remote_mappings);
$local_languages[$local_language] = $local_language;
}
else {
$local_languages[$language] = $this
->mapToRemoteLanguage($language);
}
}
foreach (\Drupal::languageManager()
->getLanguages() as $language => $info) {
$remote_language = $this
->mapToRemoteLanguage($language);
if (isset($remote_languages[$remote_language])) {
$local_languages[$language] = $language;
}
}
return $local_languages;
}
/**
* {@inheritdoc}
*/
public function mapToRemoteLanguage($language) {
if (!$this
->providesRemoteLanguageMappings()) {
return $language;
}
$mapping = $this
->get('remote_languages_mappings');
$remote_languages = $this
->getSupportedRemoteLanguages();
if (!empty($mapping) && array_key_exists($language, $mapping)) {
if (empty($remote_languages) || array_key_exists($mapping[$language], $remote_languages)) {
return $mapping[$language];
}
}
$default_mappings = $this
->getPlugin()
->getDefaultRemoteLanguagesMappings();
if (isset($default_mappings[$language])) {
return $default_mappings[$language];
}
if ($matching_language = \Drupal::service('tmgmt.language_matcher')
->getMatchingLangcode($language, $remote_languages)) {
return $matching_language;
}
return $language;
}
/**
* Updates the language cache.
*/
protected function updateCache() {
if ($plugin = $this
->getPlugin()) {
$info = $plugin
->getPluginDefinition();
if (!isset($info['language_cache']) || !empty($info['language_cache'])) {
\Drupal::cache('data')
->set('tmgmt_languages:' . $this->name, $this->languageCache, Cache::PERMANENT, $this
->getCacheTags());
\Drupal::cache('data')
->set('tmgmt_language_pairs:' . $this->name, $this->languagePairsCache, Cache::PERMANENT, $this
->getCacheTags());
}
}
}
/**
* {@inheritdoc}
*/
public function providesRemoteLanguageMappings() {
$definition = \Drupal::service('plugin.manager.tmgmt.translator')
->getDefinition($this
->getPluginId());
if (!isset($definition['map_remote_languages'])) {
return TRUE;
}
return $definition['map_remote_languages'];
}
/**
* {@inheritdoc}
*/
public function hasCustomSettingsHandling() {
$definition = \Drupal::service('plugin.manager.tmgmt.translator')
->getDefinition($this
->getPluginId());
if (isset($definition['job_settings_custom_handling'])) {
return $definition['job_settings_custom_handling'];
}
return FALSE;
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
parent::calculateDependencies();
if ($this
->getPlugin()) {
$this
->addDependency('module', $this
->getPlugin()
->getPluginDefinition()['provider']);
}
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyTrait:: |
protected | property | Cache contexts. | |
CacheableDependencyTrait:: |
protected | property | Cache max-age. | |
CacheableDependencyTrait:: |
protected | property | Cache tags. | |
CacheableDependencyTrait:: |
protected | function | Sets cacheability; useful for value object constructors. | |
ConfigEntityBase:: |
private | property | Whether the config is being deleted by the uninstall process. | |
ConfigEntityBase:: |
protected | property | The language code of the entity's default language. | |
ConfigEntityBase:: |
protected | property | The original ID of the configuration entity. | |
ConfigEntityBase:: |
protected | property | The enabled/disabled status of the configuration entity. | 4 |
ConfigEntityBase:: |
protected | property | Third party entity settings. | |
ConfigEntityBase:: |
protected | property | Trust supplied data and not use configuration schema on save. | |
ConfigEntityBase:: |
protected | property | Information maintained by Drupal core about configuration. | |
ConfigEntityBase:: |
protected | function | Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). | |
ConfigEntityBase:: |
public | function |
Creates a duplicate of the entity. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Disables the configuration entity. Overrides ConfigEntityInterface:: |
1 |
ConfigEntityBase:: |
public | function |
Enables the configuration entity. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Returns the value of a property. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Returns the cache tags that should be used to invalidate caches. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Gets the configuration dependency name. Overrides EntityBase:: |
|
ConfigEntityBase:: |
protected static | function | Gets the configuration manager. | |
ConfigEntityBase:: |
public | function |
Gets the configuration target identifier for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the configuration dependencies. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the original ID. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
protected | function | Gets the typed config manager. | |
ConfigEntityBase:: |
public | function |
Gets whether on not the data is trusted. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
protected static | function |
Override to never invalidate the individual entities' cache tags; the
config system already invalidates them. Overrides EntityBase:: |
|
ConfigEntityBase:: |
protected | function |
Override to never invalidate the entity's cache tag; the config system
already invalidates it. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Checks whether this entity is installable. Overrides ConfigEntityInterface:: |
2 |
ConfigEntityBase:: |
public | function |
Overrides Entity::isNew(). Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Deprecated way of generating a link to the entity. See toLink(). Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface:: |
7 |
ConfigEntityBase:: |
public | function |
Acts on an entity before the presave hook is invoked. Overrides EntityBase:: |
13 |
ConfigEntityBase:: |
public | function |
Saves an entity permanently. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Sets the value of a property. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Sets the original ID. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Sets the status of the configuration entity. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function | ||
ConfigEntityBase:: |
public static | function | Helper callback for uasort() to sort configuration entities by weight and label. | 6 |
ConfigEntityBase:: |
public | function |
Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface:: |
4 |
ConfigEntityBase:: |
public | function |
Gets an array of all property values. Overrides EntityBase:: |
2 |
ConfigEntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Sets that the data should be trusted. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Unsets a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the public URL for this entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Constructs an Entity object. Overrides EntityBase:: |
10 |
ConfigEntityBase:: |
public | function |
Overrides EntityBase:: |
4 |
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | Aliased as: traitSleep | 1 |
DependencySerializationTrait:: |
public | function | 2 | |
DependencyTrait:: |
protected | property | The object's dependencies. | |
DependencyTrait:: |
protected | function | Adds multiple dependencies. | |
DependencyTrait:: |
protected | function | Adds a dependency. Aliased as: addDependencyTrait | |
EntityBase:: |
protected | property | Boolean indicating whether the entity should be forced to be new. | |
EntityBase:: |
protected | property | The entity type. | |
EntityBase:: |
protected | property | A typed data object wrapping this entity. | |
EntityBase:: |
public | function |
Checks data value access. Overrides AccessibleInterface:: |
1 |
EntityBase:: |
public | function |
Gets the bundle of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public static | function |
Constructs a new entity object, without permanently saving it. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Deletes an entity permanently. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Enforces an entity to be new. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets the entity manager. | |
EntityBase:: |
protected | function | Gets the entity type bundle info service. | |
EntityBase:: |
protected | function | Gets the entity type manager. | |
EntityBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
Gets the key that is used to store configuration dependencies. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the entity type definition. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the ID of the type of the entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | The list cache tags to invalidate for this entity. | |
EntityBase:: |
public | function |
Gets a typed data object for this entity object. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Indicates if a link template exists for a given key. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the label of the entity. Overrides EntityInterface:: |
6 |
EntityBase:: |
public | function |
Gets the language of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the language manager. | |
EntityBase:: |
protected | function | Gets an array link templates. | 1 |
EntityBase:: |
public static | function |
Loads an entity. Overrides EntityInterface:: |
|
EntityBase:: |
public static | function |
Loads one or more entities. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Acts on a created entity before hooks are invoked. Overrides EntityInterface:: |
4 |
EntityBase:: |
public static | function |
Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface:: |
16 |
EntityBase:: |
public static | function |
Acts on loaded entities. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface:: |
14 |
EntityBase:: |
public static | function |
Changes the values of an entity before it is created. Overrides EntityInterface:: |
5 |
EntityBase:: |
public | function |
Gets a list of entities referenced by this entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Generates the HTML for a link to this entity. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets a list of URI relationships supported by this entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets an array of placeholders for this entity. | 2 |
EntityBase:: |
public | function |
Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the UUID generator. | |
PluginDependencyTrait:: |
protected | function | Calculates and adds dependencies of a specific plugin instance. | 1 |
PluginDependencyTrait:: |
protected | function | Calculates and returns dependencies of a specific plugin instance. | |
PluginDependencyTrait:: |
protected | function | Wraps the module handler. | 1 |
PluginDependencyTrait:: |
protected | function | Wraps the theme handler. | 1 |
RefinableCacheableDependencyTrait:: |
public | function | 1 | |
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
SynchronizableEntityTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
public | function | ||
Translator:: |
protected | property | Whether to skip reviewing process and auto accepting translation. | |
Translator:: |
protected | property | Description of the translator. | |
Translator:: |
protected | property | Label of the translator. | |
Translator:: |
protected | property | The supported target languages caches. | |
Translator:: |
protected | property | Whether the language cache in the database is outdated. | |
Translator:: |
protected | property | The supported language pairs caches. | |
Translator:: |
protected | property | Machine readable name of the translator. | |
Translator:: |
protected | property | Plugin name of the translator. | |
Translator:: |
protected | property | The supported remote languages caches. | |
Translator:: |
protected | property | The remote languages mappings. | |
Translator:: |
protected | property | Translator type specific settings. | |
Translator:: |
protected | property |
The UUID of this translator. Overrides ConfigEntityBase:: |
|
Translator:: |
protected | property | Weight of the translator. | |
Translator:: |
public | function |
Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityBase:: |
|
Translator:: |
public | function |
Checks whether a translator is available. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Check whether this translator can handle a particular translation job. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Clears the language cache for this translator. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Returns the translator plugin ID. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Returns the translator plugin of this translator. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Returns the translator plugin ID. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Gets existing remote languages mappings. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Retrieves a setting value from the translator settings. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Returns the array of settings. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Gets the supported language pairs for this translator. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Gets all supported languages of the translator plugin. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Returns the supported target languages for this translator. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Returns if the plugin has any settings for this job. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Determines if job settings of the translator will be handled by its plugin. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Checks if the translator plugin of this translator exists. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Gets the identifier. Overrides EntityBase:: |
|
Translator:: |
public | function |
Checks if it can skip the reviewing process and automatically accepts all translations. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Maps remote languages to local languages. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Maps local language to remote language. Overrides TranslatorInterface:: |
|
Translator:: |
public static | function |
Acts on entities before they are deleted and before hooks are invoked. Overrides ConfigEntityBase:: |
|
Translator:: |
public | function |
Determines if this translator supports remote language mappings. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Sets whether to skip the reviewing process and automatically accept all translations. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Sets the plugin ID. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Sets a definition setting. Overrides TranslatorInterface:: |
|
Translator:: |
public | function |
Sets the array of settings. Overrides TranslatorInterface:: |
|
Translator:: |
protected | function | Updates the language cache. |