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


PHP Zend_Form_Element::getId方法代码示例

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


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

示例1: renderLabel

 public function renderLabel(Zend_Form_Element $element, Zend_View_Interface $view)
 {
     $label = $element->getLabel();
     if (empty($label)) {
         $label = $element->getName();
     }
     return '<div class="pointer" onClick = goToErrorLabel(\'' . $element->getId() . '\')>' . $this->getMarkupElementLabelStart() . $view->escape($label) . $this->getMarkupElementLabelEnd() . '</div>';
 }
开发者ID:knatorski,项目名称:SMS,代码行数:8,代码来源:FormErrorsGoTo.php

示例2: _getDefaultElementDecorator

 /**
  * 
  * @param Zend_Form_Element $element
  * @return string[]
  */
 private function _getDefaultElementDecorator(Zend_Form_Element $element)
 {
     $decorator = array();
     if ($element instanceof Zend_Form_Element_Checkbox) {
         $decorator[] = array(array('Label-Open' => 'HtmlTag'), array('tag' => 'label', 'class' => 'checkbox', 'id' => $element->getId() . '-label', 'for' => $element->getName(), 'openOnly' => true));
         $decorator[] = 'ViewHelper';
         $decorator[] = array('CheckBoxLabel');
         $decorator[] = array(array('Label-Closing' => 'HtmlTag'), array('tag' => 'label', 'closeOnly' => true));
         $decorator[] = array('Errors', array('placement' => 'append'));
         $decorator[] = array('Description', array('tag' => 'span', 'class' => 'help-block'));
         $decorator[] = array(array('Inner-Wrapper' => 'HtmlTag'), array('tag' => 'div', 'class' => 'col-sm-10'));
         $decorator[] = array(array('Outer-Wrapper' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'));
         return $decorator;
     }
     if ($element instanceof Zend_Form_Element_Submit || $element instanceof Zend_Form_Element_Reset || $element instanceof Zend_Form_Element_Button) {
         $decorator[] = 'ViewHelper';
         return $decorator;
     }
     if ($element instanceof Zend_Form_Element_File) {
         $decorator[] = 'File';
         $decorator[] = 'Errors';
         $decorator[] = array('Description', array('tag' => 'span', 'class' => 'input-file', 'placement' => 'prepend'));
         $decorator[] = array(array('File-Wrapper' => 'HtmlTag'), array('tag' => 'span', 'class' => 'btn btn-default'));
     } else {
         $decorator[] = 'ViewHelper';
         $decorator[] = 'Errors';
         $decorator[] = array('Description', array('tag' => 'span', 'class' => 'help-block'));
     }
     if ($this->_type === self::TYPE_HORIZONTAL) {
         $decorator[] = array(array('Inner-Wrapper' => 'HtmlTag'), array('tag' => 'div', 'class' => 'col-sm-10'));
         $decorator[] = array('Label', array('class' => 'control-label col-sm-2'));
         $decorator[] = array(array('Outer-Wrapper' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'));
     } else {
         $decorator[] = 'Label';
         $decorator[] = array('HtmlTag', array('tag' => 'div', 'class' => 'form-group'));
     }
     return $decorator;
 }
开发者ID:cliftonscott,项目名称:zend-twitter-bootstrap,代码行数:43,代码来源:Form.php

示例3: updateId

 /**
  * Updates the ID of the given element.
  *
  * @param Zend_Form_Element $element
  */
 protected function updateId(Zend_Form_Element $element)
 {
     $currentId = $element->getId();
     $newId = $currentId . '-' . uniqid();
     $element->setAttrib('id', $newId);
 }
开发者ID:matthimatiker,项目名称:molcomponents,代码行数:11,代码来源:UniqueId.php

示例4: decorateConfig

 public function decorateConfig($content, Zend_Form_Element $element, array $options)
 {
     $view = $this->getView();
     $value = $view->escape($element->getValue());
     return '<textarea name="' . $view->escape($element->getName()) . '"' . ' class="f-max-size" readonly="readonly"' . ' id="' . $view->escape($element->getId()) . '"' . ' rows="' . (substr_count($value, "\n") + 1) . '" cols="80" style="width: 100%;"' . '>' . $value . '</textarea>';
 }
开发者ID:EZ-NetTools,项目名称:ext-slave-dns-manager,代码行数:6,代码来源:View.php


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