You are here

public function TranslatorListBuilder::getDefaultOperations in Translation Management Tool 8

Gets this list's default operations.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.

Return value

array The array structure is identical to the return value of self::getOperations().

Overrides ConfigEntityListBuilder::getDefaultOperations

File

src/Entity/ListBuilder/TranslatorListBuilder.php, line 90

Class

TranslatorListBuilder
Provides a listing of translators.

Namespace

Drupal\tmgmt\Entity\ListBuilder

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $operations['clone'] = array(
    'url' => $entity
      ->toUrl('clone-form'),
    'title' => t('Clone'),
    'weight' => 50,
  );
  return $operations;
}