Inicializovanie v config.neon $this->user->getStorage()->setNamespace
- steelbull
- Člen | 241
V BasePresenteri mam metodu initialize. Nastavujem tu okrem ineho user storage namespace. Viem toto namespace nejako presunut a zadefinovat v config.neon aby bolo nastavenie inicializovane este skor, ako BasePresenter?
private function initialize()
{
// If translationDebug is enabled, translation shortcut will be displayed instead of translated strings
if ($this->translationDebug == true) {
$this->translator->switchOff();
}
// Set session storage
$this->user->getStorage()->setNamespace($this->configuration['appNamespace']);
// Set user permissions defined in database
$this->acl = (new UserACL($this->context))->setPermissions();
// Set user authorizator
$this->user->setAuthorizator(new UserAuthorizator($this->acl, $this->user));
// Initialize redirects
$this->redirects = new RedirectHelper($this);
}