当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element::getDecorators方法代码示例

本文整理汇总了PHP中Zend_Form_Element::getDecorators方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element::getDecorators方法的具体用法?PHP Zend_Form_Element::getDecorators怎么用?PHP Zend_Form_Element::getDecorators使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element的用法示例。


在下文中一共展示了Zend_Form_Element::getDecorators方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addElement

 /**
  * Add element to stack
  *
  * @param  \Zend_Form_Element $element
  * @return \Zend_Form_DisplayGroup
  */
 public function addElement(\Zend_Form_Element $element)
 {
     $decorators = $element->getDecorators();
     $decorator = array_shift($decorators);
     $element->setDecorators(array($decorator, array('Description', array('class' => 'description')), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array('Label'), array(array('labelCell' => 'HtmlTag'), array('tag' => 'td', 'class' => 'label')), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $this->_alternate))));
     return parent::addElement($element);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:13,代码来源:TabGroup.php

示例2: getDecorators

 /**
  * Retrieve all decorators
  *
  * @throws ZendX_JQuery_Form_Exception
  * @return array
  */
 public function getDecorators()
 {
     $decorators = parent::getDecorators();
     if (count($decorators) > 0) {
         // Only check this if there are decorators present, otherwise it could
         // be that the decorators have not been initialized yet.
         $foundUiWidgetElementMarker = false;
         foreach ($decorators as $decorator) {
             if ($decorator instanceof ZendX_JQuery_Form_Decorator_UiWidgetElementMarker) {
                 $foundUiWidgetElementMarker = true;
             }
         }
         if ($foundUiWidgetElementMarker === false) {
             require_once "ZendX/JQuery/Form/Exception.php";
             throw new ZendX_JQuery_Form_Exception("Cannot render jQuery form element without at least one decorator " . "implementing the 'ZendX_JQuery_Form_Decorator_UiWidgetElementMarker' interface. " . "Default decorator for this marker interface is the 'ZendX_JQuery_Form_Decorator_UiWidgetElement'. " . "Hint: The ViewHelper decorator does not render jQuery elements correctly.");
         }
     }
     return $decorators;
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:25,代码来源:UiWidget.php

示例3: testCanDisableRegisteringDefaultDecoratorsDuringInitialization

 public function testCanDisableRegisteringDefaultDecoratorsDuringInitialization()
 {
     $element = new Zend_Form_Element('foo', array('disableLoadDefaultDecorators' => true));
     $decorators = $element->getDecorators();
     $this->assertEquals(array(), $decorators);
 }
开发者ID:vicfryzel,项目名称:zf,代码行数:6,代码来源:ElementTest.php


注:本文中的Zend_Form_Element::getDecorators方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。