-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class ConfirmationExecutor extends Modal implements JsExecutorInterface | |
/** @var UserAction|null Action to execute */ | ||
public $action; | ||
|
||
/** @var JsExpressionable|\Closure JS expression to return if action was successful, e.g "new JsToast('Thank you')" */ | ||
/** @var JsExpressionable|\Closure<T of Model>($this, T, mixed, mixed): ?JsBlock JS expression to return if action was successful, e.g "new JsToast('Thank you')" */ | ||
public $jsSuccess; | ||
Check failure on line 33 in src/UserAction/ConfirmationExecutor.php GitHub Actions / Smoke (latest, StaticAnalysis)
Check failure on line 33 in src/UserAction/ConfirmationExecutor.php GitHub Actions / Smoke (latest, StaticAnalysis)
Check failure on line 33 in src/UserAction/ConfirmationExecutor.php GitHub Actions / Smoke (latest, StaticAnalysis)
|
||
|
||
/** @var string CSS class for modal size. */ | ||
|
@@ -180,7 +180,7 @@ protected function doFinal(View $modal): void | |
protected function jsGetExecute($obj, $id): JsBlock | ||
{ | ||
$success = $this->jsSuccess instanceof \Closure | ||
? ($this->jsSuccess)($this, $this->action->getModel(), $id) | ||
? ($this->jsSuccess)($this, $this->action->getModel(), $id, $obj) | ||
Check failure on line 183 in src/UserAction/ConfirmationExecutor.php GitHub Actions / Smoke (latest, StaticAnalysis)
|
||
: $this->jsSuccess; | ||
|
||
return new JsBlock([ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters