/** * (non-PHPdoc) * @see library/Zend/Form/Zend_Form_Element#init() */ public function init() { parent::init(); // call the CrFramework form element common init function // refer to CrFramework_Form_Element_ElementCommon.php CrFramework_Form_Element_ElementCommon::init($this, $this->_cssClass); }
public function init() { parent::init(); translate('-- Select a Language --'); $this->addMultiOption(0, '-- Select a Language --'); $this->addMultiOptions(Zend_Locale::getTranslationList('language', Zend_Registry::get('Zend_Locale'))); asort($this->options); }
public function init() { parent::init(); $this->setLabel("Nivel"); $this->addMultiOption(-1, '-- Nivel --'); $this->addMultiOptions(self::$niveles); $v = new Zend_Validate_InArray(array_keys(self::$niveles)); $this->setAttribs(array('class' => 'multi', 'data-basename' => 'nivel')); $this->addValidator($v); $this->setRequired(); }
public function init() { parent::init(); $fp = fopen(dirname(__FILE__) . '/zone.tab', 'r'); $timezones = array(); while ($row = fgets($fp)) { if ($row[0] == '#') { continue; } $elements = explode("\t", $row); $timezones[trim($elements[2])] = trim(strtr($elements[2], '_', ' ')); } ksort($timezones); translate('-- Select a Timezone --'); $this->addMultiOption(0, '-- Select a Timezone --'); foreach ($timezones as $key => $value) { $this->addMultiOption($key, $value); } }
/** * Initialisiert das Formularelement. * * Fügt PrefixPath für angepasste OPUS Dekoratoren hinzu. */ public function init() { parent::init(); $this->addPrefixPath('Form_Decorator', 'Form/Decorator', Zend_Form::DECORATOR); }