class LingotekConfigTranslationController in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 4.0.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.0.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.1.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.2.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.3.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.4.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.5.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.6.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.7.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
- 3.8.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController
Hierarchy
- class \Drupal\Core\Controller\ControllerBase implements ContainerInjectionInterface uses LoggerChannelTrait, MessengerTrait, LinkGeneratorTrait, RedirectDestinationTrait, UrlGeneratorTrait, StringTranslationTrait
- class \Drupal\config_translation\Controller\ConfigTranslationController
- class \Drupal\lingotek\Controller\LingotekConfigTranslationController
- class \Drupal\config_translation\Controller\ConfigTranslationController
Expanded class hierarchy of LingotekConfigTranslationController
File
- src/
Controller/ LingotekConfigTranslationController.php, line 28
Namespace
Drupal\lingotek\ControllerView source
class LingotekConfigTranslationController extends ConfigTranslationController {
/**
* The language-locale mapper.
*
* @var \Drupal\lingotek\LanguageLocaleMapperInterface
*/
protected $languageLocaleMapper;
/**
* The Lingotek configuration service.
*
* @var \Drupal\lingotek\LingotekConfigurationServiceInterface
*/
protected $lingotekConfiguration;
/**
* The Lingotek config translation service.
*
* @var \Drupal\lingotek\LingotekConfigTranslationServiceInterface $translationService
*/
protected $translationService;
/**
* Constructs a LingotekConfigTranslationController.
*
* @param \Drupal\lingotek\LanguageLocaleMapperInterface $language_locale_mapper
* The language-locale mapper.
* @param \Drupal\lingotek\LingotekConfigTranslationServiceInterface $translation_service
* The Lingotek config translation service.
* @param \Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_configuration
* The Lingotek configuration service.
* @param \Drupal\config_translation\ConfigMapperManagerInterface $config_mapper_manager
* The configuration mapper manager.
* @param \Drupal\Core\Access\AccessManagerInterface $access_manager
* The menu link access service.
* @param \Symfony\Component\Routing\Matcher\RequestMatcherInterface $router
* The dynamic router service.
* @param \Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor
* The inbound path processor.
* @param \Drupal\Core\Session\AccountInterface $account
* The current user.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer.
*/
public function __construct(LanguageLocaleMapperInterface $language_locale_mapper, LingotekConfigTranslationServiceInterface $translation_service, LingotekConfigurationServiceInterface $lingotek_configuration, ConfigMapperManagerInterface $config_mapper_manager, AccessManagerInterface $access_manager, RequestMatcherInterface $router, InboundPathProcessorInterface $path_processor, AccountInterface $account, LanguageManagerInterface $language_manager, RendererInterface $renderer) {
parent::__construct($config_mapper_manager, $access_manager, $router, $path_processor, $account, $language_manager, $renderer);
$this->languageLocaleMapper = $language_locale_mapper;
$this->lingotekConfiguration = $lingotek_configuration;
$this->translationService = $translation_service;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('lingotek.language_locale_mapper'), $container
->get('lingotek.config_translation'), $container
->get('lingotek.configuration'), $container
->get('plugin.manager.config_translation.mapper'), $container
->get('access_manager'), $container
->get('router'), $container
->get('path_processor_manager'), $container
->get('current_user'), $container
->get('language_manager'), $container
->get('renderer'));
}
public function itemPage(Request $request, RouteMatchInterface $route_match, $plugin_id) {
$page = parent::itemPage($request, $route_match, $plugin_id);
$entity = NULL;
$entity_id = NULL;
/** @var \Drupal\config_translation\ConfigMapperInterface $mapper */
$mapper = $this->configMapperManager
->createInstance($plugin_id);
$mapper
->populateFromRouteMatch($route_match);
$languages = $this->languageManager
->getLanguages();
$languages = array_filter($languages, function (LanguageInterface $language) {
$configLanguage = ConfigurableLanguage::load($language
->getId());
return $this->lingotekConfiguration
->isLanguageEnabled($configLanguage);
});
$original_langcode = $mapper
->getLangcode();
if (!isset($languages[$original_langcode])) {
// If the language is not configured on the site, create a dummy language
// object for this listing only to ensure the user gets useful info.
$language_name = $this->languageManager
->getLanguageName($original_langcode);
$languages[$original_langcode] = new Language(array(
'id' => $original_langcode,
'name' => $language_name,
));
}
if ($mapper instanceof ConfigEntityMapper) {
/** @var $mapper ConfigEntityMapper */
$entity = $mapper
->getEntity();
$entity_id = $entity
->id();
}
if ($entity_id === NULL) {
$entity_id = $plugin_id;
}
foreach ($languages as $language) {
$langcode = $language
->getId();
$locale = $this->languageLocaleMapper
->getLocaleForLangcode($langcode);
if ($locale && $langcode === $original_langcode) {
$page['languages'][$langcode]['operations']['#links']['upload'] = array(
'title' => $this
->t('Upload'),
'url' => Url::fromRoute('lingotek.config.upload', [
'entity_type' => $plugin_id,
'entity_id' => $entity_id,
]),
);
if ($entity && ($document_id = $this->translationService
->getDocumentId($entity))) {
$page['languages'][$langcode]['operations']['#links']['check_upload'] = array(
'title' => $this
->t('Check upload status'),
'url' => Url::fromRoute('lingotek.config.check_upload', [
'entity_type' => $plugin_id,
'entity_id' => $entity_id,
]),
);
}
elseif ($entity_id === $plugin_id) {
if ($document_id = $this->translationService
->getConfigDocumentId($mapper)) {
$page['languages'][$langcode]['operations']['#links']['check_upload'] = array(
'title' => $this
->t('Check upload status'),
'url' => Url::fromRoute('lingotek.config.check_upload', [
'entity_type' => $plugin_id,
'entity_id' => $entity_id,
]),
);
}
}
}
if ($locale && $langcode !== $original_langcode) {
if (isset($page['languages'][$langcode]['operations']['#links']['add'])) {
// If we have a config entity and it has a document id, we want to show
// the ability of requesting translations.
if ($entity && ($document_id = $this->translationService
->getDocumentId($entity))) {
$target_status = $this->translationService
->getTargetStatus($entity, $langcode);
$this
->generateOperationsLinks($page, $plugin_id, $entity_id, $target_status, $langcode, $locale);
}
elseif ($entity_id === $plugin_id && ($document_id = $this->translationService
->getConfigDocumentId($mapper))) {
$target_status = $this->translationService
->getConfigTargetStatus($mapper, $langcode);
$this
->generateOperationsLinks($page, $plugin_id, $entity_id, $target_status, $langcode, $locale);
}
}
if (isset($page['languages'][$langcode]['operations']['#links']['edit'])) {
if ($entity && ($document_id = $this->translationService
->getDocumentId($entity))) {
$target_status = $this->translationService
->getTargetStatus($entity, $langcode);
$this
->generateOperationsLinks($page, $plugin_id, $entity_id, $target_status, $langcode, $locale);
}
elseif ($entity_id === $plugin_id && ($document_id = $this->translationService
->getConfigDocumentId($mapper))) {
$target_status = $this->translationService
->getConfigTargetStatus($mapper, $langcode);
$this
->generateOperationsLinks($page, $plugin_id, $entity_id, $target_status, $langcode, $locale);
}
}
}
}
return $page;
}
public function upload($entity_type, $entity_id, Request $request) {
if ($entity_type === $entity_id) {
// It is not a config entity, but a config object.
$definition = $this->configMapperManager
->getDefinition($entity_type);
$mappers = $this->configMapperManager
->getMappers();
if ($this->translationService
->getConfigDocumentId($mappers[$entity_type])) {
try {
if ($this->translationService
->updateConfig($entity_type)) {
drupal_set_message($this
->t('%label has been updated.', [
'%label' => $definition['title'],
]));
}
} catch (LingotekApiException $e) {
// Mark the document as failed.
$this->translationService
->setConfigSourceStatus($mappers[$entity_type], Lingotek::STATUS_ERROR);
drupal_set_message($this
->t('%label update failed. Please try again.', [
'%label' => $mappers[$entity_type]
->getTitle(),
]), 'error');
}
}
else {
try {
if ($this->translationService
->uploadConfig($entity_type)) {
drupal_set_message($this
->t('%label uploaded successfully', [
'%label' => $definition['title'],
]));
}
} catch (LingotekApiException $e) {
// Mark the document as failed.
$this->translationService
->setConfigSourceStatus($mappers[$entity_type], Lingotek::STATUS_ERROR);
drupal_set_message($this
->t('%label upload failed. Please try again.', [
'%label' => $mappers[$entity_type]
->getTitle(),
]), 'error');
}
}
return $this
->redirectToConfigTranslateOverview($entity_type);
}
// Check if it's a field.
if (substr($entity_type, -7) == '_fields') {
// Hack for fields, the entity is field config.
$entity_type = 'field_config';
}
$entity = $this
->entityManager()
->getStorage($entity_type)
->load($entity_id);
if ($this->translationService
->getDocumentId($entity)) {
try {
if ($this->translationService
->updateDocument($entity)) {
drupal_set_message($this
->t('%label has been updated.', [
'%label' => $entity
->label(),
]));
}
} catch (LingotekApiException $e) {
// Mark the document as failed.
$this->translationService
->setSourceStatus($entity, Lingotek::STATUS_ERROR);
drupal_set_message($this
->t('%label update failed. Please try again.', [
'%label' => $entity
->label(),
]), 'error');
}
}
else {
try {
if ($this->translationService
->uploadDocument($entity)) {
drupal_set_message($this
->t('%label uploaded successfully', [
'%label' => $entity
->label(),
]));
}
} catch (LingotekApiException $e) {
// Mark the document as failed.
$this->translationService
->setSourceStatus($entity, Lingotek::STATUS_ERROR);
drupal_set_message($this
->t('%label upload failed. Please try again.', [
'%label' => $entity
->label(),
]), 'error');
}
}
return $this
->redirectToEntityTranslateOverview($entity_type, $entity_id);
}
public function update($entity_type, $entity_id, Request $request) {
if ($entity_type === $entity_id) {
// It is not a config entity, but a config object.
$definition = $this->configMapperManager
->getDefinition($entity_type);
$mappers = $this->configMapperManager
->getMappers();
try {
if ($this->translationService
->updateConfig($entity_type)) {
drupal_set_message($this
->t('%label has been updated.', [
'%label' => $definition['title'],
]));
}
} catch (LingotekApiException $e) {
// Mark the document as failed.
$this->translationService
->setConfigSourceStatus($mappers[$entity_type], Lingotek::STATUS_ERROR);
drupal_set_message($this
->t('%label update failed. Please try again.', [
'%label' => $definition['title'],
]), 'error');
}
return $this
->redirectToConfigTranslateOverview($entity_type);
}
// Check if it's a field.
if (substr($entity_type, -7) == '_fields') {
// Hack for fields, the entity is field config.
$entity_type = 'field_config';
}
$entity = $this
->entityManager()
->getStorage($entity_type)
->load($entity_id);
try {
if ($this->translationService
->updateDocument($entity)) {
drupal_set_message($this
->t('%label has been updated.', [
'%label' => $entity
->label(),
]));
}
} catch (LingotekApiException $e) {
// Mark the document as failed.
$this->translationService
->setSourceStatus($entity, Lingotek::STATUS_ERROR);
drupal_set_message($this
->t('%label update failed. Please try again.', [
'%label' => $entity
->label(),
]), 'error');
}
return $this
->redirectToEntityTranslateOverview($entity_type, $entity_id);
}
public function checkUpload($entity_type, $entity_id, Request $request) {
if ($entity_type === $entity_id) {
// It is not a config entity, but a config object.
$definition = $this->configMapperManager
->getDefinition($entity_type);
try {
if ($this->translationService
->checkConfigSourceStatus($entity_type)) {
drupal_set_message($this
->t('%label status checked successfully', [
'%label' => $definition['title'],
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label status check failed. Please try again.', [
'%label' => $definition['title'],
]), 'error');
}
return $this
->redirectToConfigTranslateOverview($entity_type);
}
// Check if it's a field.
if (substr($entity_type, -7) == '_fields') {
// Hack for fields, the entity is field config.
$entity_type = 'field_config';
}
$entity = $this
->entityManager()
->getStorage($entity_type)
->load($entity_id);
try {
if ($this->translationService
->checkSourceStatus($entity)) {
drupal_set_message($this
->t('%label status checked successfully', [
'%label' => $entity
->label(),
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label status check failed. Please try again.', [
'%label' => $entity
->label(),
]), 'error');
}
return $this
->redirectToEntityTranslateOverview($entity_type, $entity_id);
}
public function request($entity_type, $entity_id, $locale, Request $request) {
if ($entity_type === $entity_id) {
// It is not a config entity, but a config object.
$definition = $this->configMapperManager
->getDefinition($entity_type);
try {
if ($this->translationService
->addConfigTarget($entity_id, $locale)) {
drupal_set_message($this
->t('Translation to %locale requested successfully', [
'%locale' => $locale,
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label @locale translation request failed. Please try again.', [
'%label' => $definition['title'],
'@locale' => $locale,
]), 'error');
}
return $this
->redirectToConfigTranslateOverview($entity_type);
}
// Check if it's a field.
if (substr($entity_type, -7) == '_fields') {
// Hack for fields, the entity is field config.
$entity_type = 'field_config';
}
$entity = $this
->entityManager()
->getStorage($entity_type)
->load($entity_id);
try {
if ($this->translationService
->addTarget($entity, $locale)) {
drupal_set_message($this
->t('Translation to %locale requested successfully', [
'%locale' => $locale,
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label @locale translation request failed. Please try again.', [
'%label' => $entity
->label(),
'@locale' => $locale,
]), 'error');
}
return $this
->redirectToEntityTranslateOverview($entity_type, $entity_id);
}
public function checkDownload($entity_type, $entity_id, $locale, Request $request) {
if ($entity_type === $entity_id) {
// It is not a config entity, but a config object.
$definition = $this->configMapperManager
->getDefinition($entity_type);
try {
if ($this->translationService
->checkConfigTargetStatus($entity_id, $locale)) {
drupal_set_message($this
->t('Translation to %locale checked successfully', [
'%locale' => $locale,
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label @locale translation status check failed. Please try again.', [
'%label' => $entity_id,
'@locale' => $locale,
]), 'error');
}
return $this
->redirectToConfigTranslateOverview($entity_type);
}
// Check if it's a field.
if (substr($entity_type, -7) == '_fields') {
// Hack for fields, the entity is field config.
$entity_type = 'field_config';
}
$entity = $this
->entityManager()
->getStorage($entity_type)
->load($entity_id);
try {
if ($this->translationService
->checkTargetStatus($entity, $locale)) {
drupal_set_message($this
->t('Translation to %locale status checked successfully', [
'%locale' => $locale,
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label @locale translation status check failed. Please try again.', [
'%label' => $entity
->label(),
'@locale' => $locale,
]), 'error');
}
return $this
->redirectToEntityTranslateOverview($entity_type, $entity_id);
}
public function download($entity_type, $entity_id, $locale, Request $request) {
if ($entity_type === $entity_id) {
// It is not a config entity, but a config object.
$definition = $this->configMapperManager
->getDefinition($entity_type);
try {
if ($this->translationService
->downloadConfig($entity_id, $locale)) {
drupal_set_message($this
->t('Translation to %locale downloaded successfully', [
'%locale' => $locale,
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label @locale translation download failed. Please try again.', [
'%label' => $definition['title'],
'@locale' => $locale,
]), 'error');
}
return $this
->redirectToConfigTranslateOverview($entity_type);
}
// Check if it's a field.
if (substr($entity_type, -7) == '_fields') {
// Hack for fields, the entity is field config.
$entity_type = 'field_config';
}
$entity = $this
->entityManager()
->getStorage($entity_type)
->load($entity_id);
try {
if ($this->translationService
->downloadDocument($entity, $locale)) {
drupal_set_message($this
->t('Translation to %locale downloaded successfully', [
'%locale' => $locale,
]));
}
} catch (LingotekApiException $e) {
drupal_set_message($this
->t('%label @locale translation download failed. Please try again.', [
'%label' => $entity
->label(),
'@locale' => $locale,
]), 'error');
}
return $this
->redirectToEntityTranslateOverview($entity_type, $entity_id);
}
/**
* Redirect to config entity translation overview page.
*
* @param string $entity_type
* The config entity type id.
* @param string $entity_id
* The config entity id.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* A redirect response.
*/
protected function redirectToEntityTranslateOverview($entity_type, $entity_id) {
$mappers = $this->configMapperManager
->getMappers();
if ($entity_type === 'field_config') {
$field_config = FieldConfig::load($entity_id);
$id = $field_config
->getTargetEntityTypeId();
$mapper = $mappers[$id . '_fields'];
$mapper
->setEntity($field_config);
$entity_definition = $this->entityManager
->getDefinition($id);
$uri = Url::fromRoute($mapper
->getOverviewRouteName(), [
$entity_type => $entity_id,
$entity_definition
->getBundleEntityType() => $field_config
->getTargetBundle(),
]);
}
else {
$mapper = $mappers[$entity_type];
$uri = Url::fromRoute($mapper
->getOverviewRouteName(), [
$entity_type => $entity_id,
]);
}
return new RedirectResponse($uri
->setAbsolute(TRUE)
->toString());
}
/**
* Redirect to config translation overview page.
*
* @param string $plugin_id
* The plugin id.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* A redirect response.
*/
protected function redirectToConfigTranslateOverview($plugin_id) {
$mappers = $this->configMapperManager
->getMappers();
$mapper = $mappers[$plugin_id];
$uri = Url::fromRoute($mapper
->getOverviewRouteName());
return new RedirectResponse($uri
->setAbsolute(TRUE)
->toString());
}
/**
* Generates the operation links for each language.
*
* @param array &$page
* The reference of the page build render array where we need to add the
* links to.
* @param string $plugin_id
* The plugin id, which is needed for building the link. It could be the
* entity type id or the plugin id of the config mapper.
* @param string $entity_id
* The entity id. If it's a config mapper and not an entity, it would be the
* plugin id.
* @param int $target_status
* The target status for this language. This way we decide which link must
* be shown.
* @param $langcode
* The langcode of the translation we are building the link to. Used for
* keying the link in the page array.
* @param $locale
* Lingotek locale we are creating the link for. Used for building the link
* itself.
*/
protected function generateOperationsLinks(&$page, $plugin_id, $entity_id, $target_status, $langcode, $locale) {
$route_params = [
'entity_type' => $plugin_id,
'entity_id' => $entity_id,
'locale' => $locale,
];
if ($target_status === NULL || $target_status == Lingotek::STATUS_REQUEST || $target_status == Lingotek::STATUS_EDITED || $target_status == Lingotek::STATUS_UNTRACKED) {
$page['languages'][$langcode]['operations']['#links']['request'] = array(
'title' => $this
->t('Request translation'),
'url' => Url::fromRoute('lingotek.config.request', $route_params),
);
}
elseif ($target_status == Lingotek::STATUS_PENDING) {
$page['languages'][$langcode]['operations']['#links']['check_download'] = array(
'title' => $this
->t('Check Download'),
'url' => Url::fromRoute('lingotek.config.check_download', $route_params),
);
}
elseif ($target_status == Lingotek::STATUS_READY) {
$page['languages'][$langcode]['operations']['#links']['download'] = array(
'title' => $this
->t('Download'),
'url' => Url::fromRoute('lingotek.config.download', $route_params),
);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigTranslationController:: |
protected | property | The menu link access service. | |
ConfigTranslationController:: |
protected | property | The current user. | |
ConfigTranslationController:: |
protected | property | The configuration mapper manager. | |
ConfigTranslationController:: |
protected | property |
The language manager. Overrides ControllerBase:: |
|
ConfigTranslationController:: |
protected | property | The path processor service. | |
ConfigTranslationController:: |
protected | property | The renderer. | |
ConfigTranslationController:: |
protected | property | The dynamic router service. | |
ControllerBase:: |
protected | property | The configuration factory. | |
ControllerBase:: |
protected | property | The current user service. | 1 |
ControllerBase:: |
protected | property | The entity form builder. | |
ControllerBase:: |
protected | property | The entity manager. | |
ControllerBase:: |
protected | property | The entity type manager. | |
ControllerBase:: |
protected | property | The form builder. | 2 |
ControllerBase:: |
protected | property | The key-value storage. | 1 |
ControllerBase:: |
protected | property | The module handler. | 2 |
ControllerBase:: |
protected | property | The state service. | |
ControllerBase:: |
protected | function | Returns the requested cache bin. | |
ControllerBase:: |
protected | function | Retrieves a configuration object. | |
ControllerBase:: |
private | function | Returns the service container. | |
ControllerBase:: |
protected | function | Returns the current user. | 1 |
ControllerBase:: |
protected | function | Retrieves the entity form builder. | |
ControllerBase:: |
protected | function | Retrieves the entity manager service. | |
ControllerBase:: |
protected | function | Retrieves the entity type manager. | |
ControllerBase:: |
protected | function | Returns the form builder service. | 2 |
ControllerBase:: |
protected | function | Returns a key/value storage collection. | 1 |
ControllerBase:: |
protected | function | Returns the language manager service. | 1 |
ControllerBase:: |
protected | function | Returns the module handler. | 2 |
ControllerBase:: |
protected | function |
Returns a redirect response object for the specified route. Overrides UrlGeneratorTrait:: |
|
ControllerBase:: |
protected | function | Returns the state storage service. | |
LingotekConfigTranslationController:: |
protected | property | The language-locale mapper. | |
LingotekConfigTranslationController:: |
protected | property | The Lingotek configuration service. | |
LingotekConfigTranslationController:: |
protected | property | The Lingotek config translation service. | |
LingotekConfigTranslationController:: |
public | function | ||
LingotekConfigTranslationController:: |
public | function | ||
LingotekConfigTranslationController:: |
public static | function |
Instantiates a new instance of this class. Overrides ConfigTranslationController:: |
|
LingotekConfigTranslationController:: |
public | function | ||
LingotekConfigTranslationController:: |
protected | function | Generates the operation links for each language. | |
LingotekConfigTranslationController:: |
public | function |
Language translations overview page for a configuration name. Overrides ConfigTranslationController:: |
|
LingotekConfigTranslationController:: |
protected | function | Redirect to config translation overview page. | |
LingotekConfigTranslationController:: |
protected | function | Redirect to config entity translation overview page. | |
LingotekConfigTranslationController:: |
public | function | ||
LingotekConfigTranslationController:: |
public | function | ||
LingotekConfigTranslationController:: |
public | function | ||
LingotekConfigTranslationController:: |
public | function |
Constructs a LingotekConfigTranslationController. Overrides ConfigTranslationController:: |
|
LinkGeneratorTrait:: |
protected | property | The link generator. | 1 |
LinkGeneratorTrait:: |
protected | function | Returns the link generator. | |
LinkGeneratorTrait:: |
protected | function | Renders a link to a route given a route name and its parameters. | |
LinkGeneratorTrait:: |
public | function | Sets the link generator service. | |
LoggerChannelTrait:: |
protected | property | The logger channel factory service. | |
LoggerChannelTrait:: |
protected | function | Gets the logger for a specific channel. | |
LoggerChannelTrait:: |
public | function | Injects the logger channel factory. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
RedirectDestinationTrait:: |
protected | property | The redirect destination service. | 1 |
RedirectDestinationTrait:: |
protected | function | Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url. | |
RedirectDestinationTrait:: |
protected | function | Returns the redirect destination service. | |
RedirectDestinationTrait:: |
public | function | Sets the redirect destination service. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
UrlGeneratorTrait:: |
protected | property | The url generator. | |
UrlGeneratorTrait:: |
protected | function | Returns the URL generator service. | |
UrlGeneratorTrait:: |
public | function | Sets the URL generator service. | |
UrlGeneratorTrait:: |
protected | function | Generates a URL or path for a specific route based on the given parameters. |