public function ImageStyleListBuilder::getDefaultOperations in Drupal 8
Same name and namespace in other branches
- 9 core/modules/image/src/ImageStyleListBuilder.php \Drupal\image\ImageStyleListBuilder::getDefaultOperations()
- 10 core/modules/image/src/ImageStyleListBuilder.php \Drupal\image\ImageStyleListBuilder::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
- core/
modules/ image/ src/ ImageStyleListBuilder.php, line 35
Class
- ImageStyleListBuilder
- Defines a class to build a listing of image style entities.
Namespace
Drupal\imageCode
public function getDefaultOperations(EntityInterface $entity) {
$flush = [
'title' => t('Flush'),
'weight' => 200,
'url' => $entity
->toUrl('flush-form'),
];
$operations = parent::getDefaultOperations($entity) + [
'flush' => $flush,
];
// Remove destination URL from the edit link to allow editing image
// effects.
if (isset($operations['edit'])) {
$operations['edit']['url'] = $entity
->toUrl('edit-form');
}
return $operations;
}