示例#1
0
 /**
  * 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 'createElement':
             $this->_formid = $caller->getAttribute('id');
             break;
     }
     return parent::onQuickFormEvent($event, $arg, $caller);
 }
示例#2
0
 /**
  * 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':
             civicrm_drupal_wysiwyg_update_value($this, $caller);
             break;
         case 'addElement':
             $format = $arg[0] . '_format';
             $this->format = $caller->get($format);
             if (!$this->format) {
                 $this->format = variable_get('civicrm_wysiwyg_input_format', defined('FILTER_FORMAT_DEFAULT') ? FILTER_FORMAT_DEFAULT : null);
             }
             $caller->set($format, $this->format);
             parent::onQuickFormEvent($event, $arg, $caller);
             break;
         default:
             parent::onQuickFormEvent($event, $arg, $caller);
     }
     return true;
 }