You are here

public function PushNotificationListBuilder::getOperations in Push Notifications 8

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/Entity/Controller/PushNotificationListBuilder.php, line 40
Contains Drupal\push_notifications\Entity\Controller\PushNotificationListBuilder

Class

PushNotificationListBuilder
Provides a list controller for the push_notification entity.

Namespace

Drupal\push_notifications\Entity\Controller

Code

public function getOperations(EntityInterface $entity) {
  $operations = parent::getOperations($entity);

  // @todo: Create route to send the push notification through a link
  return $operations;
}