public function OembedProviderListBuilder::getDefaultOperations in oEmbed Providers 2.x
Same name and namespace in other branches
- 1.0.x src/OembedProviderListBuilder.php \Drupal\oembed_providers\OembedProviderListBuilder::getDefaultOperations()
- 1.1.x src/OembedProviderListBuilder.php \Drupal\oembed_providers\OembedProviderListBuilder::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/
OembedProviderListBuilder.php, line 34
Class
- OembedProviderListBuilder
- Provides a listing of custom oEmbed providers.
Namespace
Drupal\oembed_providersCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
$operations['edit'] = [
'title' => $this
->t('Edit'),
'weight' => 15,
'url' => $entity
->toUrl('edit-form'),
];
$operations['delete'] = [
'title' => $this
->t('Delete'),
'weight' => 15,
'url' => $entity
->toUrl('delete-form'),
];
return $operations;
}