本文整理匯總了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);
}