You are here

public function SimpleSitemapListBuilder::getDefaultOperations in Simple XML sitemap 4.x

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/SimpleSitemapListBuilder.php, line 74

Class

SimpleSitemapListBuilder
Class SimpleSitemapListBuilder

Namespace

Drupal\simple_sitemap

Code

public function getDefaultOperations(EntityInterface $entity) : array {
  return [
    [
      'title' => $this
        ->t('Edit'),
      'url' => $entity
        ->toUrl('edit-form'),
    ],
    [
      'title' => $this
        ->t('Delete'),
      'url' => $entity
        ->toUrl('delete-form'),
    ],
  ];
}