function ResponsiveImageStyleListBuilder::getDefaultOperations

Same name and namespace in other branches
  1. 10 core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php \Drupal\responsive_image\ResponsiveImageStyleListBuilder::getDefaultOperations()
  2. 11.x core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php \Drupal\responsive_image\ResponsiveImageStyleListBuilder::getDefaultOperations()
  3. 9 core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php \Drupal\responsive_image\ResponsiveImageStyleListBuilder::getDefaultOperations()
  4. 8.9.x core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php \Drupal\responsive_image\ResponsiveImageStyleListBuilder::getDefaultOperations()

Overrides ConfigEntityListBuilder::getDefaultOperations

File

core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php, line 33

Class

ResponsiveImageStyleListBuilder
Provides a listing of responsive image styles.

Namespace

Drupal\responsive_image

Code

protected function getDefaultOperations(EntityInterface $entity) {
  $args = func_get_args();
  $cacheability = $args[1] ?? new CacheableMetadata();
  $operations = parent::getDefaultOperations($entity, $cacheability);
  $operations['duplicate'] = [
    'title' => $this->t('Duplicate'),
    'weight' => 15,
    'url' => $entity->toUrl('duplicate-form'),
  ];
  return $operations;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.