public function EncryptionProfileListBuilder::getDefaultOperations in Encrypt 8.3
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/
Controller/ EncryptionProfileListBuilder.php, line 118
Class
- EncryptionProfileListBuilder
- Provides a listing of encryption profile entities.
Namespace
Drupal\encrypt\ControllerCode
public function getDefaultOperations(EntityInterface $entity) {
/* @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
$operations = parent::getDefaultOperations($entity);
if ($entity
->hasLinkTemplate('test-form')) {
$operations['test'] = [
'title' => $this
->t('Test'),
'weight' => 30,
'url' => $entity
->toUrl('test-form'),
];
}
return $operations;
}