Added get/setLangId() method in session

This commit is contained in:
franck
2013-09-02 02:04:36 +02:00
parent beab17a18d
commit e1cc7162ae
9 changed files with 76 additions and 48 deletions

View File

@@ -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())
));

View File

@@ -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());