diff --git a/packages/sonata-extra-bundle/ActionableAdmin/ExecutionNotifier.php b/packages/sonata-extra-bundle/ActionableAdmin/ExecutionNotifier.php index e0590ca9..e8d724a1 100644 --- a/packages/sonata-extra-bundle/ActionableAdmin/ExecutionNotifier.php +++ b/packages/sonata-extra-bundle/ActionableAdmin/ExecutionNotifier.php @@ -75,10 +75,7 @@ public function notifyExecution(ObjectActionExecutioner $objectActionExecutioner 'DrawSonataExtraBundle' ); - $this->notifier->send( - (new SonataNotification($subject)) - ->setSonataFlashType('info') - ); + $this->notifier->send(SonataNotification::info($subject)); } } diff --git a/packages/sonata-extra-bundle/Notifier/Notification/SonataNotification.php b/packages/sonata-extra-bundle/Notifier/Notification/SonataNotification.php index ca337205..81721178 100644 --- a/packages/sonata-extra-bundle/Notifier/Notification/SonataNotification.php +++ b/packages/sonata-extra-bundle/Notifier/Notification/SonataNotification.php @@ -13,6 +13,11 @@ public static function success(string $message): self return (new self($message))->setSonataFlashType('success'); } + public static function info(string $message): self + { + return (new self($message))->setSonataFlashType('info'); + } + public static function error(string $message): self { return (new self($message))->setSonataFlashType('error');