本文整理汇总了PHP中Zend_Form_Element_Select::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Select::init方法的具体用法?PHP Zend_Form_Element_Select::init怎么用?PHP Zend_Form_Element_Select::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Select
的用法示例。
在下文中一共展示了Zend_Form_Element_Select::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* (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);
}
示例2: init
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);
}
示例3: init
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();
}
示例4: init
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);
}
}
示例5: init
/**
* 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);
}