예제 #1
0
 /**
  *@desc Generate page, processing yours childs.
  *@param DOMNode $current
  *@return void
  */
 public function generateObject($current)
 {
     $this->_genNode = XmlUtil::CreateChild($current, $this->_NODE, "");
     XmlUtil::AddAttribute($this->_genNode, "id", $this->getId());
     XmlUtil::AddAttribute($this->_genNode, "style", $this->getStyle());
     parent::generatePage($this->_genNode);
 }
예제 #2
0
 /**
  *@desc Generate page, processing yours childs using the parent.
  *@return DOMDocument
  */
 public function makeDomObject()
 {
     $xmlDoc = XmlUtil::CreateXmlDocument();
     $root = XmlUtil::CreateChild($xmlDoc, "root");
     // Process ALL XmlnukeDocumentObject existing in Collection.
     //----------------------------------------------------------
     parent::generatePage($root);
     //----------------------------------------------------------
     return $xmlDoc;
 }
예제 #3
0
 /**
  *@desc Generate page, processing yours childs using the parent.
  *@return DOMDocument
  */
 public function makeDomObject()
 {
     $xmlDoc = XmlUtil::CreateXmlDocument();
     // Create the First first NODE ELEMENT!
     $nodePage = $xmlDoc->createElement($this->_rootNode);
     $xmlDoc->appendChild($nodePage);
     // Process ALL XmlnukeDocumentObject existing in Collection.
     //----------------------------------------------------------
     parent::generatePage($nodePage);
     //----------------------------------------------------------
     /*
     // Finalize the Create Page Execution
     XmlUtil::CreateChild($nodeMeta, "created", $created);
     XmlUtil::CreateChild($nodeMeta, "modified", date("d/M/y h:m:s"));
     $elapsed = microtime(true)-$createdTimeStamp;
     XmlUtil::CreateChild($nodeMeta, "timeelapsed", intval($elapsed/3600) . ":" . intval($elapsed/60)%60 . ":" . $elapsed%60 . "." . substr(intval((($elapsed - intval($elapsed))*1000))/1000, 2) );
     XmlUtil::CreateChild($nodeMeta, "timeelapsedsec", $elapsed );
     */
     return $xmlDoc;
 }
예제 #4
0
 public function generateObject($current)
 {
     $node = XmlUtil::CreateChild($current, "inputgroup", "");
     XmlUtil::AddAttribute($node, "name", $this->_name);
     if ($this->_caption) {
         XmlUtil::AddAttribute($node, "caption", $this->_caption);
     }
     if ($this->_canhide) {
         XmlUtil::AddAttribute($node, "canhide", "true");
     }
     if ($this->_breakline) {
         XmlUtil::AddAttribute($node, "breakline", "true");
     }
     if (!$this->_visible) {
         XmlUtil::AddAttribute($node, "visible", "false");
     }
     parent::generatePage($node);
 }
예제 #5
0
 public function generateObject($current)
 {
     $node = XmlUtil::CreateChild($current, "uialert", "");
     XmlUtil::AddAttribute($node, "type", $this->_uialert);
     XmlUtil::AddAttribute($node, "name", $this->_name);
     XmlUtil::AddAttribute($node, "title", $this->_title);
     if ($this->_autoHide > 0) {
         XmlUtil::AddAttribute($node, "autohide", $this->_autoHide);
     }
     if ($this->_openAction) {
         XmlUtil::AddAttribute($node, "openaction", $this->_openAction);
         XmlUtil::AddAttribute($node, "openactiontext", $this->_openActionText);
     }
     if ($this->_width > 0) {
         XmlUtil::AddAttribute($node, "width", $this->_width);
     }
     if ($this->_height > 0) {
         XmlUtil::AddAttribute($node, "height", $this->_height);
     }
     foreach ($this->_buttons as $key => $value) {
         $btn = XmlUtil::CreateChild($node, "button", $value);
         XmlUtil::AddAttribute($btn, "text", $key);
     }
     $body = XmlUtil::CreateChild($node, "body");
     parent::generatePage($body);
 }
예제 #6
0
 /**
  *@desc Generate page, processing yours childs.
  *@param DOMNode $current
  *@return void
  */
 public function generateObject($current)
 {
     $block = "";
     switch ($this->_position) {
         case BlockPosition::Center:
             $block = "blockcenter";
             break;
         case BlockPosition::Left:
             $block = "blockleft";
             break;
         case BlockPosition::Right:
             $block = "blockright";
             break;
     }
     if ($block == "") {
         throw new InvalidArgumentException("XmlBlockCollection: You selected an unknown Block Position.");
     }
     $objBlockCenter = XmlUtil::CreateChild($current, $block, "");
     XmlUtil::CreateChild($objBlockCenter, "title", $this->_title);
     parent::generatePage(XmlUtil::CreateChild($objBlockCenter, "body", ""));
 }
예제 #7
0
 public function generateObject($current)
 {
     $node = XmlUtil::CreateChild($current, "flash", "");
     XmlUtil::AddAttribute($node, "major", $this->_majorVersion);
     XmlUtil::AddAttribute($node, "minor", $this->_minorVersion);
     XmlUtil::AddAttribute($node, "revision", $this->_revision);
     if ($this->_movie != "") {
         XmlUtil::AddAttribute($node, "movie", $this->getMovie());
     }
     if ($this->_width != "") {
         XmlUtil::AddAttribute($node, "width", $this->getWidth());
     }
     if ($this->_height != "") {
         XmlUtil::AddAttribute($node, "height", $this->getHeight());
     }
     foreach ($this->_extraParams as $key => $value) {
         $param = XmlUtil::CreateChild($node, "param");
         XmlUtil::AddAttribute($param, "name", $key);
         XmlUtil::AddAttribute($param, "value", str_replace("&", "&", $value));
     }
     parent::generatePage($node);
 }
예제 #8
0
 /**
  *@desc Generate page, processing yours childs using the parent.
  *@return DOMDocument
  */
 public function makeDomObject()
 {
     $created = date("d/M/y h:m:s");
     $createdTimeStamp = microtime(true);
     $xmlDoc = XmlUtil::CreateXmlDocument();
     // Create the First first NODE ELEMENT!
     $nodePage = $xmlDoc->createElement("page");
     $xmlDoc->appendChild($nodePage);
     // Create the META node
     $nodeMeta = XmlUtil::CreateChild($nodePage, "meta", "");
     XmlUtil::CreateChild($nodeMeta, "title", $this->_pageTitle);
     XmlUtil::CreateChild($nodeMeta, "abstract", $this->_abstract);
     XmlUtil::CreateChild($nodeMeta, "keyword", $this->_keyword);
     XmlUtil::CreateChild($nodeMeta, "groupkeyword", $this->_groupKeyword);
     foreach ($this->_metaTag as $key => $value) {
         XmlUtil::CreateChild($nodeMeta, $key, $value);
     }
     // Create MENU (if exists some elements in menu).
     foreach ($this->_menuGroup as $key => $menuGroup) {
         if (sizeof($menuGroup->menus) > 0) {
             $nodeGroup = XmlUtil::CreateChild($nodePage, "group", "");
             XmlUtil::CreateChild($nodeGroup, "id", $key);
             XmlUtil::CreateChild($nodeGroup, "title", $menuGroup->menuTitle);
             XmlUtil::CreateChild($nodeGroup, "keyword", "all");
             foreach ($menuGroup->menus as $item) {
                 $nodeWorking = XmlUtil::CreateChild($nodeGroup, "page", "");
                 XmlUtil::CreateChild($nodeWorking, "id", $item->id);
                 XmlUtil::CreateChild($nodeWorking, "title", $item->title);
                 XmlUtil::CreateChild($nodeWorking, "summary", $item->summary);
                 if ($item->icon != "") {
                     XmlUtil::CreateChild($nodeWorking, "icon", $item->icon);
                 }
             }
         }
     }
     // Add Custom JS
     if (!$this->_disableButtonsOnSubmit) {
         $this->addJavaScriptSource("var XMLNUKE_DISABLEBUTTON = false;\n", false);
     }
     if ($this->_waitLoading) {
         $this->addJavaScriptSource("var XMLNUKE_WAITLOADING = true;\n", false);
     }
     // Generate Scripts
     if (!is_null($this->_scripts)) {
         foreach ($this->_scripts as $script) {
             $nodeWorking = XmlUtil::CreateChild($nodePage, "script", "");
             XmlUtil::AddAttribute($nodeWorking, "language", "javascript");
             if (!is_null($script->source)) {
                 XmlUtil::AddTextNode($nodeWorking, $script->source, true);
             }
             if (!is_null($script->file)) {
                 XmlUtil::AddAttribute($nodeWorking, "src", $script->file);
             }
             XmlUtil::AddAttribute($nodeWorking, "location", $script->location);
         }
     }
     // Process ALL XmlnukeDocumentObject existing in Collection.
     //----------------------------------------------------------
     parent::generatePage($nodePage);
     //----------------------------------------------------------
     // Finalize the Create Page Execution
     XmlUtil::CreateChild($nodeMeta, "created", $created);
     XmlUtil::CreateChild($nodeMeta, "modified", date("d/M/y h:m:s"));
     $elapsed = microtime(true) - $createdTimeStamp;
     XmlUtil::CreateChild($nodeMeta, "timeelapsed", intval($elapsed / 3600) . ":" . intval($elapsed / 60) % 60 . ":" . $elapsed % 60 . "." . substr(intval(($elapsed - intval($elapsed)) * 1000) / 1000, 2));
     XmlUtil::CreateChild($nodeMeta, "timeelapsedsec", $elapsed);
     return $xmlDoc;
 }
예제 #9
0
 /**
  * Generate page, processing yours childs.
  *
  * @param DOMNode $current
  */
 public function generateObject($current)
 {
     parent::generatePage(XmlUtil::CreateChild($current, "p", ""));
 }
예제 #10
0
 public function generateObject($current)
 {
     $node = XmlUtil::CreateChild($current, "container", "");
     if ($this->_class != "") {
         XmlUtil::AddAttribute($node, "class", $this->getClass());
     }
     if ($this->_align != "") {
         XmlUtil::AddAttribute($node, "align", $this->getAlign());
     }
     if ($this->_style != "") {
         XmlUtil::AddAttribute($node, "style", $this->getStyle());
     }
     if ($this->_id != "") {
         XmlUtil::AddAttribute($node, "id", $this->getId());
     }
     if ($this->_timeOut > 0) {
         XmlUtil::AddAttribute($node, "timeout", $this->getHideAfterTime());
     }
     parent::generatePage($node);
 }