本文整理汇总了PHP中Zend_Form::setIsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form::setIsArray方法的具体用法?PHP Zend_Form::setIsArray怎么用?PHP Zend_Form::setIsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form
的用法示例。
在下文中一共展示了Zend_Form::setIsArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCanSetArrayFlag
public function testCanSetArrayFlag()
{
$this->testFormIsNotAnArrayByDefault();
$this->form->setIsArray(true);
$this->assertTrue($this->form->isArray());
$this->form->setIsArray(false);
$this->assertFalse($this->form->isArray());
}
示例2: getForm
public function getForm($includeSubmit = false)
{
if ($this->_campaignForm instanceof Zend_Form) {
$form = $this->_campaignForm;
} else {
$form = new Zend_Form();
$form->setIsArray(true);
$form->addElement('hidden', 'id');
$form->addElement('text', 'name', array('label' => 'Campaign'));
$nameField = $form->getelement('name');
$nameField->setRequired(true);
$this->_campaignForm = $form;
$this->_populateForm();
$form = $this->_campaignForm;
}
if ($includeSubmit) {
$form->addElement('submit', 'submit');
}
return $form;
}
示例3: getForm
public function getForm($includeSubmit = false)
{
if ($this->_mediaForm instanceof Zend_Form) {
$form = $this->_mediaForm;
} else {
$form = new Zend_Form();
$form->setIsArray(true);
$form->addElement('hidden', 'id');
$form->addElement('text', 'name', array('label' => 'media'));
$this->_mediaForm = $form;
$this->_populateForm();
$form = $this->_mediaForm;
}
if ($includeSubmit) {
$form->addElement('submit', 'submit');
}
return $form;
}
示例4: getForm
public function getForm($includeSubmit = false)
{
if ($this->_sessionForm instanceof Zend_Form) {
$form = $this->_sessionForm;
} else {
$form = new Zend_Form();
$form->setIsArray(true);
$form->addElement('hidden', 'id');
$form->addSubForm($this->campaign->getForm(), 'campaign');
$form->addElement('text', 'date', array('label' => 'Date'));
$form->addElement('text', 'description', array('label' => 'Description'));
$form->addElement('text', 'synopsis', array('label' => 'Synopsis'));
$form->addElement('text', 'tags', array('label' => 'Tags'));
$this->_sessionForm = $form;
$this->_populateForm();
$form = $this->_sessionForm;
}
if ($includeSubmit) {
$form->addElement('submit', 'submit');
}
return $form;
}