本文整理汇总了PHP中Zend_Form_Element::removeDecorator方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element::removeDecorator方法的具体用法?PHP Zend_Form_Element::removeDecorator怎么用?PHP Zend_Form_Element::removeDecorator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element
的用法示例。
在下文中一共展示了Zend_Form_Element::removeDecorator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeAllDecorators
/**
* Remove all decorators to the specified zend form element
* @param \Zend_Form_Element $element the element to remove the decorators from
*/
public function removeAllDecorators(\Zend_Form_Element $element)
{
$element->removeDecorator("Description");
$element->removeDecorator("HtmlTag");
$element->removeDecorator("Label");
$element->removeDecorator("DtDdWrapper");
$element->removeDecorator("Errors");
}
示例2: _removeDefaultElementDecorators
/**
* Removes all default decorators from a form element.
*
* @param Zend_Form_Element $element A form element
*
* @return void
*/
protected function _removeDefaultElementDecorators(Zend_Form_Element $element)
{
$element->removeDecorator('HtmlTag');
$element->removeDecorator('Label');
$element->removeDecorator('FormElement');
$element->removeDecorator('Errors');
$element->removeDecorator('DtDdWrapper');
}
示例3: setElementDecorator
/**
* Static function that adds all the elements in 1 wrapping element instead of dt, dd structure
*
* @param $elm
* @return void
*/
public static function setElementDecorator(Zend_Form_Element $elm)
{
$elm->addPrefixPath('Glitch_Form_Decorator', 'Glitch/Form/Decorator/', 'decorator');
$labelSettings = array();
if ($elm->getDecorator('Label')) {
$labelSettings = $elm->getDecorator('Label')->getOptions();
unset($labelSettings['tag']);
//Tag should never be needed when you call this method
}
$class = 'wrapper';
if ($elm->getAttrib('wrapperClass')) {
$class .= ' ' . $elm->getAttrib('wrapperClass');
$elm->setAttrib('wrapperClass', null);
}
if ($elm instanceof Zend_Form_Element_Hidden) {
$class .= ' hidden';
}
$elm->clearDecorators()->addDecorator('Label', $labelSettings)->addDecorator('ViewHelper')->addDecorator('Description', array('escape' => false))->addDecorator('Errors')->addDecorator('Wrapper', array('tag' => 'div', 'id' => $elm->getName() . '-wrapper', 'class' => $class));
if ($elm instanceof Zend_Form_Element_Submit) {
$elm->removeDecorator('Label');
}
}
示例4: removeAllDecorators
/**
* Remove all decorators to the specified zend form element
* @param \Zend_Form_Element $element the element to remove the decorators from
*/
private function removeAllDecorators(\Zend_Form_Element $element)
{
$element->removeDecorator("Description");
$element->removeDecorator("HtmlTag");
$element->removeDecorator("Label");
}
示例5: init
/**
* Initialize form (used by extending classes)
*
* @return void
*/
public function init()
{
$element = new Zend_Form_Element('layout', array('disableLoadDefaultDecorators' => true));
$element->removeDecorator('DtDdWrapper');
}