diff -u b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php --- b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php @@ -25,7 +25,8 @@ * id = "image_style", * label = @Translation("Image style"), * controllers = { - * "operations" = "Drupal\Core\Config\Entity\ConfigEntityOperationsProvider", + * "access" = "Drupal\Core\Entity\EntityAccessController", + * "operations" = "Drupal\image\ImageStyleOperationsProvider", * "form" = { * "add" = "Drupal\image\Form\ImageStyleAddForm", * "edit" = "Drupal\image\Form\ImageStyleEditForm", diff -u b/core/modules/image/lib/Drupal/image/ImageStyleListController.php b/core/modules/image/lib/Drupal/image/ImageStyleListController.php --- b/core/modules/image/lib/Drupal/image/ImageStyleListController.php +++ b/core/modules/image/lib/Drupal/image/ImageStyleListController.php @@ -88,21 +88,6 @@ /** * {@inheritdoc} */ - public function getOperations(EntityInterface $entity) { - $uri = $entity->uri('edit-form'); - $flush = array( - 'title' => t('Flush'), - 'href' => $uri['path'] . '/flush', - 'options' => $uri['options'], - 'weight' => 200, - ); - - return parent::getOperations($entity) + array('flush' => $flush); - } - - /** - * {@inheritdoc} - */ public function render() { $build = parent::render(); $build['#empty'] = $this->t('There are currently no styles. Add a new one.', array( only in patch2: unchanged: --- /dev/null +++ b/core/modules/image/lib/Drupal/image/ImageStyleOperationsProvider.php @@ -0,0 +1,33 @@ +uri('edit-form'); + $operations['flush'] = array( + 'title' => $this->translationManager->translate('Flush'), + 'href' => $uri['path'] . '/flush', + 'options' => $uri['options'], + 'weight' => 200, + ); + + return $operations; + } +}