UserListBuilder::getOperations

public UserListBuilder::getOperations(EntityInterface $entity)

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

core/modules/user/src/UserListBuilder.php, line 169

Class

UserListBuilder
Defines a class to build a listing of user entities.

Namespace

Drupal\user

Code

public function getOperations(EntityInterface $entity) {
  $operations = parent::getOperations($entity);
  if (isset($operations['edit'])) {
    $destination = $this->redirectDestination->getAsArray();
    $operations['edit']['query'] = $destination;
  }
  return $operations;
}
doc_Drupal
2016-10-29 09:52:39
Comments
Leave a Comment

Please login to continue.