Skip to content

Commit

Permalink
[SonataExtraBundle] Add info notification (#289)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Poirier Théorêt <[email protected]>
  • Loading branch information
DumitracheAdrian and mpoiriert authored Aug 24, 2024
1 parent 2af17c3 commit 3ca4cac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ public function notifyExecution(ObjectActionExecutioner $objectActionExecutioner
'DrawSonataExtraBundle'
);

$this->notifier->send(
(new SonataNotification($subject))
->setSonataFlashType('info')
);
$this->notifier->send(SonataNotification::info($subject));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 3ca4cac

Please sign in to comment.