Release 2.0.19 (#4022)
* prevent invoices with exceeding filename * fixed invalid LDAP log level * support locale switching in action events
This commit is contained in:
@@ -18,9 +18,10 @@ use App\Entity\User;
|
||||
*/
|
||||
class PageActionsEvent extends ThemeEvent
|
||||
{
|
||||
private $action;
|
||||
private $view;
|
||||
private $divider = 0;
|
||||
private string $action;
|
||||
private string $view;
|
||||
private int $divider = 0;
|
||||
private ?string $locale = null;
|
||||
|
||||
public function __construct(User $user, array $payload, string $action, string $view)
|
||||
{
|
||||
@@ -195,4 +196,14 @@ class PageActionsEvent extends ThemeEvent
|
||||
|
||||
return \count($this->payload['actions']);
|
||||
}
|
||||
|
||||
public function getLocale(): ?string
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
public function setLocale(?string $locale): void
|
||||
{
|
||||
$this->locale = $locale;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,13 @@ class ThemeEvent extends Event
|
||||
return $this->payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 2.0.19, will be removed with 2.1
|
||||
*/
|
||||
public function setPayload(mixed $payload): void
|
||||
{
|
||||
@trigger_error('ThemeEvent::setPayload() is deprecated, use AbstractActionsSubscriber instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->payload = $payload;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user