You are here

public function XmlSitemapListBuilder::getOperations in XML sitemap 8

Same name and namespace in other branches
  1. 2.x src/XmlSitemapListBuilder.php \Drupal\xmlsitemap\XmlSitemapListBuilder::getOperations()

Provides an array of information to build a list of operation links.

Parameters

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

Return value

array An associative array of operation link data for this list, keyed by operation name, containing the following key-value pairs:

  • title: The localized title of the operation.
  • url: An instance of \Drupal\Core\Url for the operation URL.
  • weight: The weight of this operation.

Overrides EntityListBuilder::getOperations

File

src/XmlSitemapListBuilder.php, line 114

Class

XmlSitemapListBuilder
Provides a listing of XmlSitemap.

Namespace

Drupal\xmlsitemap

Code

public function getOperations(EntityInterface $entity) {

  /** @var \Drupal\xmlsitemap\XmlSitemapInterface $entity */
  $operations = parent::getOperations($entity);
  if (isset($operations['translate'])) {
    unset($operations['translate']);
  }
  return $operations;
}