Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 /**
  *@desc XmlAnchorCollection constructor
  *@param string $hrefSrc
  *@param string $target
  */
 public function __construct($hrefSrc, $target = '')
 {
     parent::__construct();
     $this->_src = $hrefSrc;
     $this->_target = $target;
 }
Ejemplo n.º 5
0
 public function addXmlnukeObject($object)
 {
     if ($object instanceof XmlnukeMediaItem) {
         parent::addXmlnukeObject($object);
     } else {
         throw new InvalidArgumentException("Object need to an instance of XmlnukeMediaItem class");
     }
 }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 7
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);
 }
Ejemplo n.º 8
0
 /**
  *@desc XmlFormCollection construction
  *@param Context $context
  *@param string $action
  *@param string $title
  */
 public function __construct($context, $action, $title)
 {
     parent::__construct();
     $this->_context = $context;
     $this->_action = $action;
     $this->_title = $title;
     $this->_formname = "frm" . $this->_context->getRandomNumber(10000);
     $this->_jsValidate = true;
     $this->_decimalSeparator = $this->_context->Language()->getDecimalPoint();
     $this->_dateformat = $this->_context->Language()->getDateFormat();
 }
Ejemplo n.º 9
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", ""));
 }
Ejemplo n.º 10
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);
 }
Ejemplo n.º 11
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;
 }
Ejemplo n.º 12
0
 /**
  * Generate page, processing yours childs.
  *
  * @param DOMNode $current
  */
 public function generateObject($current)
 {
     parent::generatePage(XmlUtil::CreateChild($current, "p", ""));
 }
Ejemplo n.º 13
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);
 }