Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

TranslationLink.php

Namespace

Drupal\content_translation\Plugin\views\field

File

core/modules/content_translation/src/Plugin/views/field/TranslationLink.php

View source
<?php

namespace Drupal\content_translation\Plugin\views\field;

use Drupal\views\Attribute\ViewsField;
use Drupal\views\Plugin\views\field\EntityLink;

/**
 * Provides a translation link for an entity.
 *
 * @ingroup views_field_handlers
 */
class TranslationLink extends EntityLink {
    
    /**
     * {@inheritdoc}
     */
    protected function getEntityLinkTemplate() {
        return 'drupal:content-translation-overview';
    }
    
    /**
     * {@inheritdoc}
     */
    protected function getDefaultLabel() {
        return $this->t('Translate');
    }

}

Classes

Title Deprecated Summary
TranslationLink Provides a translation link for an entity.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal