diff --git a/core/modules/image/lib/Drupal/image/ImageEffectBase.php b/core/modules/image/lib/Drupal/image/ImageEffectBase.php index 9fcf0f1..82901c9 100644 --- a/core/modules/image/lib/Drupal/image/ImageEffectBase.php +++ b/core/modules/image/lib/Drupal/image/ImageEffectBase.php @@ -7,12 +7,12 @@ namespace Drupal\image; -use Drupal\Core\Plugin\ContainerFactoryPluginBase; +use Drupal\Component\Plugin\PluginBase; /** * Provides a base class for image effects. */ -abstract class ImageEffectBase extends ContainerFactoryPluginBase implements ImageEffectInterface { +abstract class ImageEffectBase extends PluginBase implements ImageEffectInterface { /** * The image effect ID. diff --git a/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php index 0e9072b..d8163c4 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php @@ -212,17 +212,18 @@ public function flush() { } // Let other modules update as necessary on flush. - \Drupal::moduleHandler()->invokeAll('image_style_flush', array($this)); + $module_handler = \Drupal::moduleHandler(); + $module_handler->invokeAll('image_style_flush', array($this)); // Clear field caches so that formatters may be added for this style. field_info_cache_clear(); drupal_theme_rebuild(); // Clear page caches when flushing. - if (module_exists('block')) { - cache('block')->deleteAll(); + if ($module_handler->moduleExists('block')) { + \Drupal::cache('block')->deleteAll(); } - cache('page')->deleteAll(); + \Drupal::cache('page')->deleteAll(); return $this; }