本文整理汇总了PHP中Zend_Form::getDecorators方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form::getDecorators方法的具体用法?PHP Zend_Form::getDecorators怎么用?PHP Zend_Form::getDecorators使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form
的用法示例。
在下文中一共展示了Zend_Form::getDecorators方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAddDecoratorsKeepsNonNumericKeyNames
/**
* @group ZF-7552
*/
public function testAddDecoratorsKeepsNonNumericKeyNames()
{
$this->form->addDecorators(array(array(array('td' => 'HtmlTag'), array('tag' => 'td')), array(array('tr' => 'HtmlTag'), array('tag' => 'tr')), array('HtmlTag', array('tag' => 'baz'))));
$t1 = $this->form->getDecorators();
$this->form->setDecorators($t1);
$t2 = $this->form->getDecorators();
$this->assertEquals($t1, $t2);
}
示例2: testRetrievingNamedDecoratorShouldNotReorderDecorators
public function testRetrievingNamedDecoratorShouldNotReorderDecorators()
{
$this->form->setDecorators(array('FormElements', array(array('div' => 'HtmlTag'), array('tag' => 'div')), array(array('fieldset' => 'HtmlTag'), array('tag' => 'fieldset')), 'Form'));
$decorator = $this->form->getDecorator('fieldset');
$decorators = $this->form->getDecorators();
$i = 0;
$order = array();
foreach (array_keys($decorators) as $name) {
$order[$name] = $i;
++$i;
}
$this->assertEquals(2, $order['fieldset'], var_export($order, 1));
}
示例3: testCanDisableRegisteringFormDecoratorsDuringInitialization
public function testCanDisableRegisteringFormDecoratorsDuringInitialization()
{
$form = new Zend_Form(array('disableLoadDefaultDecorators' => true));
$decorators = $form->getDecorators();
$this->assertEquals(array(), $decorators);
}