本文整理匯總了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);
}