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


PHP HTML_QuickForm_group类代码示例

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


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

示例1: setElements

 function setElements($elements)
 {
     parent::setElements($elements);
     foreach ($this->_elements as $element) {
         if (method_exists($element, 'setHiddenLabel')) {
             $element->setHiddenLabel(true);
         }
     }
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:9,代码来源:group.php

示例2: toHtml

 /**
  * HTML representation
  */
 function toHtml()
 {
     include_once 'HTML/QuickForm/Renderer/Default.php';
     $this->_separator = '<br/>';
     $renderer =& new HTML_QuickForm_Renderer_Default();
     $renderer->setElementTemplate('{element}');
     $select_boxes = $this->_elements[2];
     $select_boxes->setElementTemplate('<div style="margin-left:20px;display:block;" id="receivers_' . $select_boxes->getName() . '">' . $select_boxes->_elementTemplate . '</div>');
     parent::accept($renderer);
     $js = $this->getElementJS();
     return $renderer->toHtml() . $js;
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:15,代码来源:receivers.php

示例3: onQuickFormEvent

 function onQuickFormEvent($event, $arg, &$caller)
 {
     if ('updateValue' == $event) {
         // we need to call setValue(), 'cause the default/constant value
         // may be in fact a timestamp, not an array
         return HTML_QuickForm_element::onQuickFormEvent($event, $arg, $caller);
     } else {
         return parent::onQuickFormEvent($event, $arg, $caller);
     }
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:10,代码来源:date.php

示例4: onQuickFormEvent

 function onQuickFormEvent($event, $arg, &$caller)
 {
     if ('updateValue' == $event) {
         // we need to call setValue() so that the secondary option
         // matches the main option
         return HTML_QuickForm_element::onQuickFormEvent($event, $arg, $caller);
     } else {
         $ret = parent::onQuickFormEvent($event, $arg, $caller);
         // add onreset handler to form to properly reset hierselect (see bug #2970)
         if ('addElement' == $event) {
             $onReset = $caller->getAttribute('onreset');
             if (strlen($onReset)) {
                 if (strpos($onReset, '_hs_setupOnReset')) {
                     $caller->updateAttributes(array('onreset' => str_replace('_hs_setupOnReset(this, [', "_hs_setupOnReset(this, ['" . $this->_escapeString($this->getName()) . "', ", $onReset)));
                 } else {
                     $caller->updateAttributes(array('onreset' => "var temp = function() { {$onReset} } ; if (!temp()) { return false; } ; if (typeof _hs_setupOnReset != 'undefined') { return _hs_setupOnReset(this, ['" . $this->_escapeString($this->getName()) . "']); } "));
                 }
             } else {
                 $caller->updateAttributes(array('onreset' => "if (typeof _hs_setupOnReset != 'undefined') { return _hs_setupOnReset(this, ['" . $this->_escapeString($this->getName()) . "']); } "));
             }
         }
         return $ret;
     }
 }
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:24,代码来源:hierselect.php

示例5: toHtml

 function toHtml()
 {
     include_once 'HTML/QuickForm/Renderer/Default.php';
     $renderer =& new HTML_QuickForm_Renderer_Default();
     $renderer->setElementTemplate($this->_wrap[0] . '{element}' . $this->_wrap[1]);
     // $renderer->setGroupElementTemplate('{element}', $this->getName());
     parent::accept($renderer);
     return $renderer->toHtml();
 }
开发者ID:nonfiction,项目名称:nterchange,代码行数:9,代码来源:n_quickform.php

示例6: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * If this function is overridden and parent is not called the element must be responsible for
  * storing the MoodleQuickForm object, see {@link MoodleQuickForm_group::setMoodleForm()}
  *
  * @param     string $event Name of event
  * @param     mixed $arg event arguments
  * @param     mixed $caller calling object
  */
 public function onQuickFormEvent($event, $arg, &$caller)
 {
     $this->setMoodleForm($caller);
     return parent::onQuickFormEvent($event, $arg, $caller);
 }
开发者ID:lucaboesch,项目名称:moodle,代码行数:15,代码来源:group.php

示例7: getValue

 function getValue()
 {
     $ret = parent::getValue();
     return $this->translateRetValues($ret);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:5,代码来源:qf_group.php


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