public function MessageListBuilder::getDefaultOperations in Mass Contact 8
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 EntityListBuilder::getDefaultOperations
File
- src/
MessageListBuilder.php, line 110
Class
- MessageListBuilder
- Mass contact message archive list builder.
Namespace
Drupal\mass_contactCode
public function getDefaultOperations(EntityInterface $entity) {
if ($entity
->access('view') && $entity
->hasLinkTemplate('canonical')) {
$operations['view'] = [
'title' => $this
->t('View'),
'weight' => 10,
'url' => $entity
->toUrl(),
];
}
return $operations;
}