2017-08-11 18:13:07 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ToolBar - ToolBar
|
|
|
|
|
* XmlFormFieldToolBar - XmlFormFieldToolBar class
|
|
|
|
|
*
|
|
|
|
|
* @package workflow.engine.ProcessMaker
|
|
|
|
|
*/
|
2017-08-14 15:53:48 -04:00
|
|
|
class XmlFormFieldToolBar extends XmlFormField
|
2017-08-11 18:13:07 -04:00
|
|
|
{
|
|
|
|
|
public $xmlfile = '';
|
|
|
|
|
public $type = 'toolbar';
|
|
|
|
|
public $toolBar;
|
|
|
|
|
public $home = '';
|
|
|
|
|
public $withoutLabel = true;
|
|
|
|
|
|
|
|
|
|
/**
|
2017-08-14 15:53:48 -04:00
|
|
|
* Constructor of the class XmlFormFieldToolBar
|
2017-08-11 18:13:07 -04:00
|
|
|
*
|
|
|
|
|
* @param string $xmlNode
|
|
|
|
|
* @param string $lang
|
|
|
|
|
* @param string $home
|
|
|
|
|
* @param string $owner
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function XmlFormFieldToolBar($xmlNode, $lang = 'en', $home = '', $owner = ' ')
|
|
|
|
|
{
|
2017-08-14 15:53:48 -04:00
|
|
|
parent::__construct($xmlNode, $lang, $home, $owner);
|
2017-08-11 18:13:07 -04:00
|
|
|
$this->home = $home;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Prints the ToolBar
|
|
|
|
|
*
|
|
|
|
|
* @param string $value
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
2017-12-04 13:25:35 +00:00
|
|
|
public function render($value = null, $paramDummy2 = NULL)
|
2017-08-11 18:13:07 -04:00
|
|
|
{
|
|
|
|
|
$this->toolBar = new ToolBar($this->xmlfile, $this->home);
|
|
|
|
|
$template = PATH_CORE . 'templates/' . $this->type . '.html';
|
|
|
|
|
$out = $this->toolBar->render($template, $scriptCode);
|
2017-12-04 13:25:35 +00:00
|
|
|
$oHeadPublisher = headPublisher::getSingleton();
|
2017-08-11 18:13:07 -04:00
|
|
|
$oHeadPublisher->addScriptFile($this->toolBar->scriptURL);
|
|
|
|
|
$oHeadPublisher->addScriptCode($scriptCode);
|
|
|
|
|
return $out;
|
|
|
|
|
}
|
|
|
|
|
}
|