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:
Kevin Papst
2023-05-12 14:45:51 +02:00
committed by GitHub
parent 1099e76244
commit 4b2a3669e6
12 changed files with 77 additions and 61 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}