protected function TransactionListBuilder::getDefaultOperations in Transaction 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/
TransactionListBuilder.php, line 261
Class
- TransactionListBuilder
- Provides a entity list page for transactions.
Namespace
Drupal\transactionCode
protected function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
// Add the execute operation.
if ($entity
->access('execute') && $entity
->hasLinkTemplate('execute-form')) {
$operations['execute'] = [
'title' => $this
->t('Execute'),
'weight' => 20,
'url' => $entity
->toUrl('execute-form'),
];
}
return $operations;
}