本文整理汇总了PHP中Zend_Form_Element_Text::setView方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Text::setView方法的具体用法?PHP Zend_Form_Element_Text::setView怎么用?PHP Zend_Form_Element_Text::setView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Text
的用法示例。
在下文中一共展示了Zend_Form_Element_Text::setView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getElement
public function getElement()
{
$element = new Zend_Form_Element_Text('foo');
$element->setView($this->getView());
$this->decorator->setElement($element);
return $element;
}
示例2: setUp
public function setUp()
{
$element = new Zend_Form_Element_Text('foo');
$element->setView(new Zend_View());
$this->_decorator = new Robo47_Form_Decorator_Info();
$this->_decorator->setElement($element);
}
示例3: setUp
/**
* See {@link PHPUnit_Framework_TestCase::setUp()} for details.
*/
protected function setUp()
{
parent::setUp();
// Usually a captcha element is rendered by the decorator,
// but for testing a text field is just as well.
// Using a text field avoids a dependency to the session.
$element = new Zend_Form_Element_Text('my_captcha');
$element->setAttrib('id', 'my-id');
// Simulate a HtmlTag ID that is based on the element name (as configured
// in the loadDefaultDecorators() mthod of the captcha element).
$element->getDecorator('HtmlTag')->setOption('id', $element->getName() . '-element');
$element->setView(new Zend_View());
$this->decorator = new Mol_Form_Decorator_Captcha_Word();
$this->decorator->setElement($element);
}