HOR-3670-RG-5 Files review:

workflow/engine/classes/XmlForm_Field_TextareaPM.php
workflow/engine/classes/XmlForm_Field_ToolBar.php
workflow/engine/classes/XmlForm_Field_ToolButton.php
workflow/engine/classes/Zip_File.php
This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-08-11 18:13:07 -04:00
committed by dante
parent c1434868b8
commit 912e91682d
7 changed files with 196 additions and 344 deletions

View File

@@ -0,0 +1,48 @@
<?php
/**
* ToolBar - ToolBar
* XmlFormFieldToolBar - XmlFormFieldToolBar class
*
* @package workflow.engine.ProcessMaker
*/
class XmlFormFieldToolBar extends XmlForm_Field
{
public $xmlfile = '';
public $type = 'toolbar';
public $toolBar;
public $home = '';
public $withoutLabel = true;
/**
* Constructor of the class XmlForm_Field_ToolBar
*
* @param string $xmlNode
* @param string $lang
* @param string $home
* @param string $owner
* @return void
*/
public function XmlFormFieldToolBar($xmlNode, $lang = 'en', $home = '', $owner = ' ')
{
parent::XmlForm_Field($xmlNode, $lang, $home, $owner);
$this->home = $home;
}
/**
* Prints the ToolBar
*
* @param string $value
* @return string
*/
public function render($value)
{
$this->toolBar = new ToolBar($this->xmlfile, $this->home);
$template = PATH_CORE . 'templates/' . $this->type . '.html';
$out = $this->toolBar->render($template, $scriptCode);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile($this->toolBar->scriptURL);
$oHeadPublisher->addScriptCode($scriptCode);
return $out;
}
}