TranslationLink.php in Drupal 8
Same filename and directory in other branches
File
core/modules/content_translation/src/Plugin/views/field/TranslationLink.phpView source
<?php
namespace Drupal\content_translation\Plugin\views\field;
use Drupal\views\Plugin\views\field\EntityLink;
/**
* Provides a translation link for an entity.
*
* @ingroup views_field_handlers
*
* @ViewsField("content_translation_link")
*/
class TranslationLink extends EntityLink {
/**
* {@inheritdoc}
*/
protected function getEntityLinkTemplate() {
return 'drupal:content-translation-overview';
}
/**
* {@inheritdoc}
*/
protected function getDefaultLabel() {
return $this
->t('Translate');
}
}
Classes
Name | Description |
---|---|
TranslationLink | Provides a translation link for an entity. |