public function HttpConfigRequestListBuilder::getDefaultOperations in HTTP Client Manager 8
Same name and namespace in other branches
- 8.2 src/HttpConfigRequestListBuilder.php \Drupal\http_client_manager\HttpConfigRequestListBuilder::getDefaultOperations()
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 ConfigEntityListBuilder::getDefaultOperations
File
- src/
HttpConfigRequestListBuilder.php, line 97
Class
- HttpConfigRequestListBuilder
- Provides a listing of Http Config Request entities.
Namespace
Drupal\http_client_managerCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if ($entity
->access('execute') && $entity
->hasLinkTemplate('execute')) {
$operations['execute'] = array(
'title' => $this
->t('Execute'),
'weight' => 101,
'url' => Url::fromRoute('entity.http_config_request.execute', [
'http_config_request' => $entity
->id(),
'serviceApi' => $entity
->get('service_api'),
'commandName' => $entity
->get('command_name'),
]),
);
}
return $operations;
}