Exemple #1
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->_currentEditLanguage = Zend_Registry::get('currentEditLanguage');
     $this->_labelCSS = Cible_FunctionsGeneral::getLanguageLabelColor($options);
     if (isset($options['addAction'])) {
         $this->_currentMode = 'add';
     }
     $lang = new Cible_Form_Element_LanguageSelector('langSelector', $this->_params, array('lang' => $this->_currentEditLanguage, 'mode' => $this->_currentMode));
     $lang->setValue($this->_currentEditLanguage)->removeDecorator('Label');
     $this->addElement($lang);
 }
Exemple #2
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (!$this->_disabledLangSwitcher) {
         $this->_currentEditLanguage = Zend_Registry::get('currentEditLanguage');
         $this->_labelCSS = Cible_FunctionsGeneral::getLanguageLabelColor($options);
         if (isset($options['addAction'])) {
             $this->_currentMode = 'add';
         }
         $lang = new Cible_Form_Element_LanguageSelector('langSelector', $this->_params, array('lang' => $this->_currentEditLanguage, 'mode' => $this->_currentMode));
         $lang->setValue($this->_currentEditLanguage)->setDecorators(array('ViewHelper'));
         if (!$this->_disabledDefaultActions) {
             $this->addActionButton($lang);
         }
     }
 }