本文整理匯總了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'];
}
//.........這裏部分代碼省略.........