本文整理汇总了PHP中Zend_Form_Element_File::setMultiFileForQool方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_File::setMultiFileForQool方法的具体用法?PHP Zend_Form_Element_File::setMultiFileForQool怎么用?PHP Zend_Form_Element_File::setMultiFileForQool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_File
的用法示例。
在下文中一共展示了Zend_Form_Element_File::setMultiFileForQool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFormElement
function getFormElement($v, $value = '')
{
$this->toTpl('hasForm', 1);
$v = $this->doQoolHook('front_pre_getformelement_element', $v);
$value = $this->doQoolHook('front_pre_getformelement_value', $value);
switch ($v['value']) {
case "editor":
$this->loadEditorBtns();
$this->toTpl("loadEditor", 1);
$this->toTpl("isEditor", 1);
$element = new Zend_Form_Element_Textarea($v['name']);
$element->setAttrib('class', 'editor span12');
if ($value != '') {
$element->setValue($value);
}
break;
case "fileinput":
$element = new Zend_Form_Element_File($v['name']);
$element->setAttrib('class', 'input-file');
break;
case "captcha":
$element = new Zend_Form_Element_Captcha($v['name'], array('label' => $this->t("Please verify you are a human"), 'captcha' => $config->site->captcha_adapter, 'captchaOptions' => array('captcha' => $config->site->captcha_adapter, 'wordLen' => 6, 'timeout' => 300)));
return $element;
break;
case "multifileinputs":
$element = new Zend_Form_Element_File($v['name']);
$element->setAttrib('class', 'input-file');
$element->setMultiFile(10);
break;
case "multifileinput":
$name = $v['name'] . "[]";
$element = new Zend_Form_Element_File($name);
$element->setAttrib('class', 'input-file');
$element->setAttrib('multiple', 'multiple');
$element->setMultiFileForQool(1);
$this->toTpl('filelist', true);
break;
case "checkbox":
$element = new Zend_Form_Element_Checkbox($v['name']);
$element->setAttrib('class', 'checkbox');
$element->setValue($value);
break;
case "editarea":
$this->toTpl('editarea', 1);
$element = new Zend_Form_Element_Textarea($v['name']);
$element->setAttrib('class', 'editarea span12');
$element->setAttrib('id', 'editarea');
$element->setAttrib('style', 'height:500px');
if ($value != '') {
$element->setValue($value);
}
break;
case "password":
$element = new Zend_Form_Element_Password($v['name']);
break;
case "textarea":
$element = new Zend_Form_Element_Textarea($v['name']);
$element->setAttrib('class', 'span9');
$element->setAttrib('style', 'height:80px');
if ($value != '') {
$element->setValue($value);
}
break;
case "hidden":
$element = new Zend_Form_Element_Hidden($v['name']);
$element->setValue($value);
$element->setDecorators(array("ViewHelper"));
break;
case "textinput":
$element = new Zend_Form_Element_Text($v['name']);
if ($value != '') {
$element->setValue($value);
}
break;
case "selectbox":
$element = new Zend_Form_Element_Select($v['name']);
if ($v['use_pool'] && method_exists($this, $v['use_pool'])) {
if ($v['pool_type'] != '0') {
$this->pool_type = $v['pool_type'];
}
if ($v['novalue']) {
$element->addMultiOption(0, $this->t('No Selection'));
}
foreach ($this->{$v}['use_pool']() as $ko => $vo) {
if ($v['noself'] && $vo['id'] == $v['noself']) {
} else {
$element->addMultiOption($vo['id'], $vo['title']);
}
}
if ($value != '') {
$element->setValue($value);
}
}
break;
case "multiselectbox":
$element = new Zend_Form_Element_Multiselect($v['name']);
if ($v['use_pool'] && method_exists($this, $v['use_pool'])) {
if ($v['pool_type'] != '0') {
$this->pool_type = $v['pool_type'];
}
//.........这里部分代码省略.........