- Added a new ArrayCollection
- Changed Action attribute and transformed it into an abstract class
This commit is contained in:
1 parent
0443f5a811
commit
9b360c4010
18 files changed
+311
-86
No files matched your search
+10
-11
@@ -10,42 +10,41 @@ use Ulmus\Entity\EntityInterface;
|
||||
class FormContext extends \Picea\Ui\Method\FormContext {
|
||||
|
||||
public function __construct(
|
||||
protected LanguageHandler $languageHandler,
|
||||
protected MessageFactoryInterface $message,
|
||||
ServerRequestInterface $request,
|
||||
protected LanguageHandler $formLanguageHandler,
|
||||
protected MessageFactoryInterface $formMessage,
|
||||
ServerRequestInterface $formContextRequest,
|
||||
? string $formName = null
|
||||
)
|
||||
{
|
||||
parent::__construct($request, $formName);
|
||||
) {
|
||||
parent::__construct($formContextRequest, $formName);
|
||||
}
|
||||
|
||||
# public function initializeEntity(EntityInterface $entity) : void {}
|
||||
|
||||
public function lang(string $key, array $variables = [])
|
||||
{
|
||||
return $this->languageHandler->languageFromKey($key, $variables);
|
||||
return $this->formLanguageHandler->languageFromKey($key, $variables);
|
||||
}
|
||||
|
||||
public function pushSuccessMessage($key, $variables = []) : void {
|
||||
$this->pushMessage($this->message::generateSuccess(
|
||||
$this->pushMessage($this->formMessage::generateSuccess(
|
||||
$this->lang($key, $variables)
|
||||
));
|
||||
}
|
||||
|
||||
public function pushWarningMessage($key, $variables = []) : void {
|
||||
$this->pushMessage($this->message::generateWarning(
|
||||
$this->pushMessage($this->formMessage::generateWarning(
|
||||
$this->lang($key, $variables)
|
||||
));
|
||||
}
|
||||
|
||||
public function pushErrorMessage($key, $variables = []) : void {
|
||||
$this->pushMessage($this->message::generateError(
|
||||
$this->pushMessage($this->formMessage::generateError(
|
||||
$a = $this->lang($key, $variables)
|
||||
));
|
||||
}
|
||||
|
||||
public function pushInfoMessage($key, $variables = []) : void {
|
||||
$this->pushMessage($this->message::generateInfo(
|
||||
$this->pushMessage($this->formMessage::generateInfo(
|
||||
$this->lang($key, $variables)
|
||||
));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user