HOR-3776
This commit is contained in:
@@ -31,6 +31,7 @@ use ProcessMaker\Plugins\Interfaces\TaskExtendedProperty;
|
||||
use ProcessMaker\Plugins\Interfaces\ToolbarDetail;
|
||||
use ProcessMaker\Plugins\Interfaces\TriggerDetail;
|
||||
use ProcessMaker\Plugins\Traits\Attributes;
|
||||
use ProcessMaker\Plugins\Traits\Init;
|
||||
use ProcessMaker\Plugins\Traits\PluginStructure;
|
||||
use Publisher;
|
||||
use stdClass;
|
||||
@@ -43,6 +44,7 @@ class PluginRegistry
|
||||
{
|
||||
use PluginStructure;
|
||||
use Attributes;
|
||||
use Init;
|
||||
|
||||
const NAME_CACHE = SYS_SYS . __CLASS__;
|
||||
/**
|
||||
|
||||
33
workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php
Normal file
33
workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Plugins\Traits;
|
||||
|
||||
/**
|
||||
* Trait Init
|
||||
* @package ProcessMaker\Plugins\Traits
|
||||
*/
|
||||
trait Init
|
||||
{
|
||||
/**
|
||||
* Initialization of functions and others of a plugin
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->initFunction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization of plugin pmFunctions
|
||||
*/
|
||||
private function initFunction()
|
||||
{
|
||||
$pmFunctions = $this->getPmFunctions();
|
||||
foreach ($pmFunctions as $namespace) {
|
||||
$filePmFunctions = PATH_PLUGINS . $namespace . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php';
|
||||
if (file_exists($filePmFunctions) && $this->isEnable($namespace)) {
|
||||
include_once($filePmFunctions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user