public function DestinationListBuilder::getDefaultOperations in Backup and Migrate 5.0.x
Same name and namespace in other branches
- 8.4 src/Controller/DestinationListBuilder.php \Drupal\backup_migrate\Controller\DestinationListBuilder::getDefaultOperations()
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/ DestinationListBuilder.php, line 48
Class
- DestinationListBuilder
- Provides a listing of Backup Destination entities.
Namespace
Drupal\backup_migrate\ControllerCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if ($entity
->access('backups') && $entity
->hasLinkTemplate('backups')) {
$operations['backups'] = [
'title' => $this
->t('List Backups'),
'weight' => 100,
'url' => $entity
->toUrl('backups'),
];
}
return $operations;
}