Added get/setLangId() method in session
This commit is contained in:
@@ -202,7 +202,8 @@ class BaseAdminController extends BaseController
|
||||
// Prepare common template variables
|
||||
$args = array_merge($args, array(
|
||||
'locale' => $session->getLocale(),
|
||||
'lang' => $session->getLang(),
|
||||
'lang_code' => $session->getLang(),
|
||||
'lang_id' => $session->getLangId(),
|
||||
'edition_language' => $edition_language,
|
||||
'current_url' => htmlspecialchars($this->getRequest()->getUri())
|
||||
));
|
||||
|
||||
@@ -67,6 +67,18 @@ class Session extends BaseSession
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLangId()
|
||||
{
|
||||
return $this->get("lang_id", Lang::getDefaultLanguage()->getId());
|
||||
}
|
||||
|
||||
public function setLangId($langId)
|
||||
{
|
||||
$this->set("lang_id", $langId);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAdminEditionLangId()
|
||||
{
|
||||
return $this->get('admin.edition_language', Lang::getDefaultLanguage()->getId());
|
||||
|
||||
Reference in New Issue
Block a user