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


PHP HTML_QuickForm_element::onQuickFormEvent方法代码示例

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


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

示例1: onQuickFormEvent

 function onQuickFormEvent($event, $arg, &$caller)
 {
     global $OUTPUT;
     switch ($event) {
         case 'addElement':
             $this->_contextid = $arg[3]['contextid'];
             $this->_filearea = $arg[3]['filearea'];
             $this->_fileareaitemid = $arg[3]['itemid'];
             $this->_format = $arg[4];
             break;
     }
     return parent::onQuickFormEvent($event, $arg, $caller);
 }
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:13,代码来源:wikifiletable.php

示例2: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param     string    $event  Name of event
  * @param     mixed     $arg    event arguments
  * @param     object    &$caller calling object
  * @since     1.0
  * @access    public
  * @return    void
  * @throws
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     switch ($event) {
         case 'updateValue':
             // do NOT use submitted values for static elements
             $value = $this->_findValue($caller->_constantValues);
             if (null === $value) {
                 $value = $this->_findValue($caller->_defaultValues);
             }
             if (null !== $value) {
                 $this->setValue($value);
             }
             break;
         default:
             parent::onQuickFormEvent($event, $arg, $caller);
     }
     return true;
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:29,代码来源:static.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

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param     string    $event  Name of event
  * @param     mixed     $arg    event arguments
  * @param     object    &$caller calling object
  * @since     1.0
  * @access    public
  * @return    void
  * @throws    
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     // do not use submit values for button-type elements
     $type = $this->getType();
     if ('updateValue' != $event || 'submit' != $type && 'reset' != $type && 'image' != $type && 'button' != $type) {
         parent::onQuickFormEvent($event, $arg, $caller);
     } else {
         $value = $this->_findValue($caller->_constantValues);
         if (null === $value) {
             $value = $this->_findValue($caller->_defaultValues);
         }
         if (null !== $value) {
             $this->setValue($value);
         }
     }
     return true;
 }
开发者ID:altesien,项目名称:FinalProject,代码行数:28,代码来源:input.php

示例5: 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

示例6: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param string $event Name of event
  * @param mixed $arg event arguments
  * @param object $caller calling object
  * @return bool
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     if ('updateValue' == $event) {
         $value = $this->_findValue($caller->_constantValues);
         if (null === $value) {
             $value = $this->_findValue($caller->_submitValues);
             // Fix for bug #4465 & #5269
             // XXX: should we push this to element::onQuickFormEvent()?
             if (null === $value && (!$caller->isSubmitted() || !$this->getMultiple())) {
                 $value = $this->_findValue($caller->_defaultValues);
             }
         }
         if (null !== $value) {
             $this->setValue($value);
         }
         return true;
     } else {
         return parent::onQuickFormEvent($event, $arg, $caller);
     }
 }
开发者ID:evltuma,项目名称:moodle,代码行数:28,代码来源:selectgroups.php

示例7: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param string $event Name of event
  * @param mixed $arg event arguments
  * @param object $caller calling object
  * @return bool
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     switch ($event) {
         case 'createElement':
             $caller->setType($arg[0], PARAM_INT);
             break;
     }
     return parent::onQuickFormEvent($event, $arg, $caller);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:17,代码来源:filemanager.php

示例8: onQuickFormEvent

 function onQuickFormEvent($event, $arg, &$caller)
 {
     if ('updateValue' != $event) {
         return parent::onQuickFormEvent($event, $arg, $caller);
     } else {
         $value = $this->_findValue($caller->_constantValues);
         if (null === $value) {
             $value = $this->_findValue($caller->_defaultValues);
         }
         if (null !== $value) {
             $this->setValue($value);
         }
     }
     return true;
 }
开发者ID:fferriere,项目名称:web,代码行数:15,代码来源:xbutton.php

示例9: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param     string    $event  Name of event
  * @param     mixed     $arg    event arguments
  * @param     object    &$caller calling object
  * @since     1.0
  * @access    public
  * @return    void
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     switch ($event) {
         case 'updateValue':
             $this->_createElementsIfNotExist();
             foreach (array_keys($this->_elements) as $key) {
                 if ($this->_appendName) {
                     $elementName = $this->_elements[$key]->getName();
                     if (is_null($elementName)) {
                         $this->_elements[$key]->setName($this->getName());
                     } elseif ('' === $elementName) {
                         $this->_elements[$key]->setName($this->getName() . '[' . $key . ']');
                     } else {
                         $this->_elements[$key]->setName($this->getName() . '[' . $elementName . ']');
                     }
                 }
                 $this->_elements[$key]->onQuickFormEvent('updateValue', $arg, $caller);
                 if ($this->_appendName) {
                     $this->_elements[$key]->setName($elementName);
                 }
             }
             break;
         default:
             parent::onQuickFormEvent($event, $arg, $caller);
     }
     return true;
 }
开发者ID:manishkhanchandani,项目名称:mkgxy,代码行数:37,代码来源:group.php

示例10: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param string $event Name of event
  * @param mixed $arg event arguments
  * @param object $caller calling object
  * @return bool
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     switch ($event) {
         case 'createElement':
             $caller->setType($arg[0] . '[format]', PARAM_ALPHANUM);
             $caller->setType($arg[0] . '[itemid]', PARAM_INT);
             break;
     }
     return parent::onQuickFormEvent($event, $arg, $caller);
 }
开发者ID:EsdrasCaleb,项目名称:moodle,代码行数:18,代码来源:editor.php

示例11: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param     string    Name of event
  * @param     mixed     event arguments
  * @param     object    calling object
  * @since     1.0
  * @access    public
  * @return    bool
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     switch ($event) {
         case 'updateValue':
             if ($caller->getAttribute('method') == 'get') {
                 return PEAR::raiseError('Cannot add a file upload field to a GET method form');
             }
             HTML_QuickForm_element::onQuickFormEvent($event, $arg, $caller);
             $caller->updateAttributes(array('enctype' => 'multipart/form-data'));
             $caller->setMaxFileSize();
             break;
         case 'addElement':
             $this->onQuickFormEvent('createElement', $arg, $caller);
             return $this->onQuickFormEvent('updateValue', null, $caller);
             break;
         case 'createElement':
             $className = get_class($this);
             $this->{$className}($arg[0], $arg[1], $arg[2]);
             break;
     }
     return true;
 }
开发者ID:nonfiction,项目名称:nterchange,代码行数:32,代码来源:n_quickform.php

示例12: onQuickFormEvent

 /**
  * Called by HTML_QuickForm whenever form event is made on this element
  *
  * @param     string  Name of event
  * @param     mixed   event arguments
  * @param     object  calling object
  * @access    public
  * @return    bool    true
  */
 function onQuickFormEvent($event, $arg, &$caller)
 {
     switch ($event) {
         case 'updateValue':
             foreach (array_keys($this->_rows) as $key) {
                 foreach (array_keys($this->_rows[$key]) as $key2) {
                     $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $caller);
                 }
             }
             break;
         default:
             parent::onQuickFormEvent($event, $arg, $caller);
     }
     return true;
 }
开发者ID:bobah,项目名称:acbdb,代码行数:24,代码来源:ElementTable.php


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