示例#1
0
 /**
  * Method addEventObject
  * @access public
  * @param WebSitePhpObject $object 
  * @param Form $form_object [default value: null]
  * @since 1.0.18
  */
 public function addEventObject($object, $form_object = null)
 {
     if (($object->isEventObject() || get_class($object) == "Form") && !$this->create_object_to_get_css_js) {
         $class_name = get_class($object);
         if ($form_object != null) {
             if (get_class($form_object) != "Form") {
                 throw new NewException("addEventObject error in the second parameter : must be a Form object", 0, getDebugBacktrace(1));
             }
             $class_name .= "_" . $form_object->getName();
             $form_object->registerObjectToForm($object);
         }
         if (!isset($this->objects[$class_name])) {
             $this->objects[$class_name] = array();
         }
         $this->objects[$class_name][] = $object;
     }
 }