This commit is contained in:
Ronald Quenta
2017-08-01 12:16:06 -04:00
parent 6cdb07c2c8
commit cc5fcb08bc
116 changed files with 4797 additions and 3202 deletions

View File

@@ -2,31 +2,113 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class CaseSchedulerPlugin
* @package ProcessMaker\Plugins\Interfaces
*/
class CaseSchedulerPlugin
{
public $sNamespace;
public $sActionId;
public $sActionForm;
public $sActionSave;
public $sActionExecute;
public $sActionGetFields;
use Attributes;
private $Namespace;
private $ActionId;
private $ActionForm;
private $ActionSave;
private $ActionExecute;
private $ActionGetFields;
/**
* This function is the constructor of the caseSchedulerPlugin class
* @param string $sNamespace
* @param string $sActionId
* @param string $sActionForm
* @param string $sActionSave
* @param string $sActionExecute
* @param string $sActionGetFields
* This function is the constructor of the CaseSchedulerPlugin class
* @param string $Namespace
* @param string $ActionId
* @param string $ActionForm
* @param string $ActionSave
* @param string $ActionExecute
* @param string $ActionGetFields
*/
public function __construct($sNamespace, $sActionId, $sActionForm, $sActionSave, $sActionExecute, $sActionGetFields)
public function __construct($Namespace, $ActionId, $ActionForm, $ActionSave, $ActionExecute, $ActionGetFields)
{
$this->sNamespace = $sNamespace;
$this->sActionId = $sActionId;
$this->sActionForm = $sActionForm;
$this->sActionSave = $sActionSave;
$this->sActionExecute = $sActionExecute;
$this->sActionGetFields = $sActionGetFields;
$this->Namespace = $Namespace;
$this->ActionId = $ActionId;
$this->ActionForm = $ActionForm;
$this->ActionSave = $ActionSave;
$this->ActionExecute = $ActionExecute;
$this->ActionGetFields = $ActionGetFields;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Get action Id
* @return string
*/
public function getActionId()
{
return $this->ActionId;
}
/**
* Get action form
* @return string
*/
public function getActionForm()
{
return $this->ActionForm;
}
/**
* Get action Save
* @return string
*/
public function getActionSave()
{
return $this->ActionSave;
}
/**
* Get action execute
* @return string
*/
public function getActionExecute()
{
return $this->ActionExecute;
}
/**
* Get action fields
* @return string
*/
public function getActionGetFields()
{
return $this->ActionGetFields;
}
/**
* Check if CaseSchedulerPlugin name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if CaseSchedulerPlugin Action Id is equal to params
* @param string $ActionId
* @return bool
*/
public function equalActionIdTo($ActionId)
{
return $ActionId == $this->ActionId;
}
}

View File

@@ -2,19 +2,55 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class CronFile
* @package ProcessMaker\Plugins\Interfaces
*/
class CronFile
{
public $namespace;
public $cronFile;
use Attributes;
private $Namespace;
private $CronFile;
/**
* This function is the constructor of the cronFile class
* @param string $namespace
* @param string $cronFile
* This function is the constructor of the CronFile class
* @param string $Namespace
* @param string $CronFile
*/
public function __construct($namespace, $cronFile)
public function __construct($Namespace, $CronFile)
{
$this->namespace = $namespace;
$this->cronFile = $cronFile;
$this->Namespace = $Namespace;
$this->CronFile = $CronFile;
}
/**
* Set value to cron file
* @param string $CronFile
*/
public function setCronFile($CronFile)
{
$this->CronFile = $CronFile;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if cron file is equal to params
* @param string $CronFile
* @return bool
*/
public function equalCronFileTo($CronFile)
{
return $CronFile == $this->CronFile;
}
}

View File

@@ -2,19 +2,65 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class CssFile
* @package ProcessMaker\Plugins\Interfaces
*/
class CssFile
{
public $sNamespace;
public $sCssFile;
use Attributes;
private $Namespace;
private $CssFile;
/**
* This function is the constructor of the cssFile class
* @param string $sNamespace
* @param string $sCssFile
* This function is the constructor of the CssFile class
* @param string $Namespace
* @param string $CssFile
*/
public function __construct($sNamespace, $sCssFile)
public function __construct($Namespace, $CssFile)
{
$this->sNamespace = $sNamespace;
$this->sCssFile = $sCssFile;
$this->Namespace = $Namespace;
$this->CssFile = $CssFile;
}
/**
* Get css file
* @return string
*/
public function getCssFile()
{
return $this->CssFile;
}
/**
* Set css file
* @param string $CssFile
*/
public function setCssFile($CssFile)
{
$this->CssFile = $CssFile;
}
/**
* Check if css file is equal to params
* @param string $CssFile
* @return bool
*/
public function equalCssFileTo($CssFile)
{
return $CssFile == $this->CssFile;
}
/**
* Check if name plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
}

View File

@@ -2,25 +2,125 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class DashboardPage
* @package ProcessMaker\Plugins\Interfaces
*/
class DashboardPage
{
public $sNamespace;
public $sPage;
public $sName;
public $sIcon;
use Attributes;
private $Namespace;
private $Page;
private $Name;
private $Icon;
/**
* This function is the constructor of the dashboardPage class
* @param string $sNamespace
* @param string $sPage
* @param string $sName
* @param string $sIcon
* This function is the constructor of the DashboardPage class
* @param string $Namespace
* @param string $Page
* @param string $Name
* @param string $Icon
*/
public function __construct($sNamespace, $sPage, $sName, $sIcon)
public function __construct($Namespace, $Page, $Name, $Icon)
{
$this->sNamespace = $sNamespace;
$this->sPage = $sPage;
$this->sName = $sName;
$this->sIcon = $sIcon;
$this->Namespace = $Namespace;
$this->Page = $Page;
$this->Name = $Name;
$this->Icon = $Icon;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Set name of plugin
* @param string $Namespace
*/
public function setNamespace($Namespace)
{
$this->Namespace = $Namespace;
}
/**
* Get page of Dashboard
* @return string
*/
public function getPage()
{
return $this->Page;
}
/**
* Set page of Dashboard
* @param string $Page
*/
public function setPage($Page)
{
$this->Page = $Page;
}
/**
* Get name of Dashboard
* @return string
*/
public function getName()
{
return $this->Name;
}
/**
* Set name of Dashboard
* @param string $Name
*/
public function setName($Name)
{
$this->Name = $Name;
}
/**
* Get icon of Dashboard
* @return string
*/
public function getIcon()
{
return $this->Icon;
}
/**
* Set icon of Dashboard
* @param string $Icon
*/
public function setIcon($Icon)
{
$this->Icon = $Icon;
}
/**
* Check if name plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if dashboard page is equal to params
* @param string $Page
* @return bool
*/
public function equalPageTo($Page)
{
return $Page == $this->Page;
}
}

View File

@@ -2,22 +2,85 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class FolderDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class FolderDetail
{
public $sNamespace;
public $sFolderId;
public $sFolderName;
use Attributes;
private $Namespace;
private $FolderId;
private $FolderName;
/**
* This function is the constructor of the folderDetail class
* @param string $sNamespace
* @param string $sFolderId
* @param string $sFolderName
* This function is the constructor of the FolderDetail class
* @param string $Namespace
* @param string $FolderId
* @param string $FolderName
*/
public function __construct($sNamespace, $sFolderId, $sFolderName)
public function __construct($Namespace, $FolderId, $FolderName)
{
$this->sNamespace = $sNamespace;
$this->sFolderId = $sFolderId;
$this->sFolderName = $sFolderName;
$this->Namespace = $Namespace;
$this->FolderId = $FolderId;
$this->FolderName = $FolderName;
}
/**
* Get folder name
* @return string
*/
public function getFolderName()
{
return $this->FolderName;
}
/**
* Set folder name
* @param string $FolderName
*/
public function setFolderName($FolderName)
{
$this->FolderName = $FolderName;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Set name of plugin
* @param string $Namespace
*/
public function setNamespace($Namespace)
{
$this->Namespace = $Namespace;
}
/**
* Check if folder id is equal to params
* @param string $folderId
* @return bool
*/
public function equalFolderIdTo($folderId)
{
return $folderId == $this->FolderId;
}
/**
* Check if name plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
}

View File

@@ -2,19 +2,78 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
class ImportCallBack
{
public $namespace;
public $callBackFile;
use Attributes;
private $Namespace;
private $CallBackFile;
/**
* This function is the constructor of the cronFile class
* @param string $namespace
* @param string $callBackFile
* This function is the constructor of the ImportCallBack class
* @param string $Namespace
* @param string $CallBackFile
*/
public function __construct($namespace, $callBackFile)
public function __construct($Namespace, $CallBackFile)
{
$this->namespace = $namespace;
$this->callBackFile = $callBackFile;
$this->Namespace = $Namespace;
$this->CallBackFile = $CallBackFile;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Set name of plugin
* @param string $Namespace
*/
public function setNamespace($Namespace)
{
$this->Namespace = $Namespace;
}
/**
* Get callback file
* @return string
*/
public function getCallBackFile()
{
return $this->CallBackFile;
}
/**
* Set callback file
* @param string $CallBackFile
*/
public function setCallBackFile($CallBackFile)
{
$this->CallBackFile = $CallBackFile;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if callback file is equal to params
* @param string $CallBackFile
* @return bool
*/
public function equalCallBackFileTo($CallBackFile)
{
return $CallBackFile == $this->CallBackFile;
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace ProcessMaker\Plugins\Interfaces;
use Exception;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class JsFile
* @package ProcessMaker\Plugins\Interfaces
*/
class JsFile
{
use Attributes;
private $Namespace;
private $CoreJsFile;
private $PluginJsFile;
/**
* This function is the constructor of the JsFile class
* @param string $Namespace
* @param string $CoreJsFile
* @param array $PluginJsFile
*/
public function __construct($Namespace, $CoreJsFile, $PluginJsFile)
{
$this->Namespace = $Namespace;
$this->CoreJsFile = $CoreJsFile;
$this->PluginJsFile = $PluginJsFile;
}
/**
* Get js files
* @return array
*/
public function getPluginJsFile()
{
return $this->PluginJsFile;
}
/**
* Check if core js file is equal to params
* @param string $CoreJsFile
* @return bool
*/
public function equalCoreJsFile($CoreJsFile)
{
return $CoreJsFile == $this->CoreJsFile;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Push one or more elements onto the PluginJsFile
* @param string|array $PluginJsFile
* @throws Exception
*/
public function pushPluginJsFile($PluginJsFile)
{
if (is_string($PluginJsFile)) {
if (!in_array($PluginJsFile, $this->PluginJsFile)) {
$this->PluginJsFile[] = $PluginJsFile;
}
} elseif (is_array($PluginJsFile)) {
$this->PluginJsFile = array_unique(
array_merge($PluginJsFile, $this->PluginJsFile)
);
} else {
throw new Exception(
'Invalid third param, $pluginJsFile should be a string or array - ' .
gettype($PluginJsFile) .
' given.'
);
}
}
}

View File

@@ -2,22 +2,67 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class MenuDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class MenuDetail
{
public $sNamespace;
public $sMenuId;
public $sFilename;
use Attributes;
private $Namespace;
private $MenuId;
private $Filename;
/**
* This function is the constructor of the menuDetail class
* @param string $sNamespace
* @param string $sMenuId
* @param string $sFilename
* This function is the constructor of the MenuDetail class
* @param string $Namespace
* @param string $MenuId
* @param string $Filename
*/
public function __construct($sNamespace, $sMenuId, $sFilename)
public function __construct($Namespace, $MenuId, $Filename)
{
$this->sNamespace = $sNamespace;
$this->sMenuId = $sMenuId;
$this->sFilename = $sFilename;
$this->Namespace = $Namespace;
$this->MenuId = $MenuId;
$this->Filename = $Filename;
}
/**
* Check if menu id is equal to params
* @param string $menuId
* @return bool
*/
public function equalMenuIdTo($menuId)
{
return $menuId == $this->MenuId;
}
/**
* Check if nmae of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if file exists
* @return bool
*/
public function exitsFile()
{
return file_exists($this->Filename);
}
/**
* Include file
* @return bool
*/
public function includeFileMenu()
{
include($this->Filename);
}
}

View File

@@ -2,16 +2,51 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class OpenReassignCallback
* @package ProcessMaker\Plugins\Interfaces
*/
class OpenReassignCallback
{
public $callBackFile;
use Attributes;
private $CallBackFile;
/**
* This function is the constructor of the cronFile class
* @param string $callBackFile
* This function is the constructor of the OpenReassignCallback class
* @param string $CallBackFile
*/
public function __construct($callBackFile)
public function __construct($CallBackFile)
{
$this->callBackFile = $callBackFile;
$this->CallBackFile = $CallBackFile;
}
/**
* Get callback file
* @return string
*/
public function getCallBackFile()
{
return $this->CallBackFile;
}
/**
* Set callback file
* @param string $CallBackFile
*/
public function setCallBackFile($CallBackFile)
{
$this->CallBackFile = $CallBackFile;
}
/**
* Check if callback file is equal to params
* @param string $CallBackFile
* @return bool
*/
public function equalCallBackFileTo($CallBackFile)
{
return $CallBackFile == $this->CallBackFile;
}
}

View File

@@ -1,83 +0,0 @@
<?php
namespace ProcessMaker\Plugins\Interfaces;
class Plugins
{
public $_aPluginDetails = array();
public $_aPlugins = array();
public $_aMenus = array();
public $_aFolders = array();
public $_aTriggers = array();
public $_aDashlets = array();
public $_aReports = array();
public $_aPmFunctions = array();
public $_aRedirectLogin = array();
public $_aSteps = array();
public $_aCSSStyleSheets = array();
public $_aToolbarFiles = array();
public $_aCaseSchedulerPlugin = array();
public $_aTaskExtendedProperties = array();
public $_aDashboardPages = array();
public $_aCronFiles = array();
public $_arrayDesignerMenu = array();
public $_aMenuOptionsToReplace = array();
public $_aImportProcessCallbackFile = array();
public $_aOpenReassignCallback = array();
public $_arrayDesignerSourcePath = array();
/**
* Registry a plugin javascript to include with js core at same runtime
*/
public $_aJavascripts = array();
/**
* Contains all rest services classes from plugins
*/
public $_restServices = array();
public $_restExtendServices = array();
public $_restServiceEnabled = array();
public static function setter($vars)
{
$has = get_object_vars(new static());
$newObject = new \stdClass();
foreach ($has as $name => $oldValue) {
if (isset($vars[$name])) {
$newObject->{$name} = $vars[$name];
unset($vars[$name]);
} else {
$newObject->{$name} = $oldValue;
}
}
if ($vars) {
$sClassName = $vars['sClassName'];
$sNamespace = $vars['sNamespace'];
$sFilename = $vars['sFilename'];
$newObjectDetails = new PluginDetail(
$sNamespace,
$sClassName,
$sFilename
);
if (class_exists($sClassName)) {
$oPlugin = new $sClassName($sNamespace, $sFilename);
} else {
$oPlugin = $newObjectDetails;
}
$newObject->_aPlugins[$sNamespace] = $oPlugin;
$hasDetails = get_object_vars($newObjectDetails);
foreach ($hasDetails as $name => $oldValue) {
if (isset($vars[$name])) {
$newObjectDetails->{$name} = $vars[$name];
unset($vars[$name]);
} else {
$newObjectDetails->{$name} = $oldValue;
}
}
$newObject->_aPluginDetails[$sNamespace] = $newObjectDetails;
}
return $newObject;
}
}

View File

@@ -2,22 +2,77 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class RedirectDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class RedirectDetail
{
public $sNamespace;
public $sRoleCode;
public $sPathMethod;
use Attributes;
private $Namespace;
private $RoleCode;
private $PathMethod;
/**
* This function is the constructor of the redirectDetail class
* @param string $sNamespace
* @param string $sRoleCode
* @param string $sPathMethod
* This function is the constructor of the RedirectDetail class
* @param string $Namespace
* @param string $RoleCode
* @param string $PathMethod
*/
public function __construct($sNamespace, $sRoleCode, $sPathMethod)
public function __construct($Namespace, $RoleCode, $PathMethod)
{
$this->sNamespace = $sNamespace;
$this->sRoleCode = $sRoleCode;
$this->sPathMethod = $sPathMethod;
$this->Namespace = $Namespace;
$this->RoleCode = $RoleCode;
$this->PathMethod = $PathMethod;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Get role code
* @return string
*/
public function getRoleCode()
{
return $this->RoleCode;
}
/**
* Get path method
* @return string
*/
public function getPathMethod()
{
return $this->PathMethod;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if role code is equal to params
* @param string $RoleCode
* @return bool
*/
public function equalRoleCodeTo($RoleCode)
{
return $RoleCode == $this->RoleCode;
}
}

View File

@@ -2,28 +2,101 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class StepDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class StepDetail
{
public $sNamespace;
public $sStepId;
public $sStepName;
public $sStepTitle;
public $sSetupStepPage;
use Attributes;
private $Namespace;
private $StepId;
private $StepName;
private $StepTitle;
private $SetupStepPage;
/**
* This function is the constructor of the stepDetail class
* @param string $sNamespace
* @param string $sStepId
* @param string $sStepName
* @param string $sStepTitle
* @param string $sSetupStepPage
* This function is the constructor of the StepDetail class
* @param string $Namespace
* @param string $StepId
* @param string $StepName
* @param string $StepTitle
* @param string $SetupStepPage
*/
public function __construct($sNamespace, $sStepId, $sStepName, $sStepTitle, $sSetupStepPage)
public function __construct($Namespace, $StepId, $StepName, $StepTitle, $SetupStepPage)
{
$this->sNamespace = $sNamespace;
$this->sStepId = $sStepId;
$this->sStepName = $sStepName;
$this->sStepTitle = $sStepTitle;
$this->sSetupStepPage = $sSetupStepPage;
$this->Namespace = $Namespace;
$this->StepId = $StepId;
$this->StepName = $StepName;
$this->StepTitle = $StepTitle;
$this->SetupStepPage = $SetupStepPage;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Get step id
* @return string
*/
public function getStepId()
{
return $this->StepId;
}
/**
* Get step Title
* @return string
*/
public function getStepTitle()
{
return $this->StepTitle;
}
/**
* Get step name
* @return string
*/
public function getStepName()
{
return $this->StepName;
}
/**
* Get setup step page
* @return string
*/
public function getSetupStepPage()
{
return $this->SetupStepPage;
}
/**
* Check if step id is equal to params
* @param string $StepId
* @return bool
*/
public function equalStepIdTo($StepId)
{
return $StepId == $this->StepId;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
}

View File

@@ -2,25 +2,107 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class TaskExtendedProperty
* @package ProcessMaker\Plugins\Interfaces
*/
class TaskExtendedProperty
{
public $sNamespace;
public $sPage;
public $sName;
public $sIcon;
use Attributes;
private $Namespace;
private $Page;
private $Name;
private $Icon;
/**
* This function is the constructor of the taskExtendedProperty class
* @param string $sNamespace
* @param string $sPage
* @param string $sName
* @param string $sIcon
* This function is the constructor of the TaskExtendedProperty class
* @param string $Namespace
* @param string $Page
* @param string $Name
* @param string $Icon
*/
public function __construct($sNamespace, $sPage, $sName, $sIcon)
public function __construct($Namespace, $Page, $Name, $Icon)
{
$this->sNamespace = $sNamespace;
$this->sPage = $sPage;
$this->sName = $sName;
$this->sIcon = $sIcon;
$this->Namespace = $Namespace;
$this->Page = $Page;
$this->Name = $Name;
$this->Icon = $Icon;
}
/**
* Set name
* @param string $Name
*/
public function setName($Name)
{
$this->Name = $Name;
}
/**
* Set icon
* @param string $Icon
*/
public function setIcon($Icon)
{
$this->Icon = $Icon;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Get page
* @return string
*/
public function getPage()
{
return $this->Page;
}
/**
* Get name
* @return string
*/
public function getName()
{
return $this->Name;
}
/**
* Get icon
* @return string
*/
public function getIcon()
{
return $this->Icon;
}
/**
* Check if nmae of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if page is equal to params
* @param string $Page
* @return bool
*/
public function equalPageTo($Page)
{
return $Page == $this->Page;
}
}

View File

@@ -2,22 +2,67 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class ToolbarDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class ToolbarDetail
{
public $sNamespace;
public $sToolbarId;
public $sFilename;
use Attributes;
private $Namespace;
private $ToolbarId;
private $Filename;
/**
* This function is the constructor of the menuDetail class
* @param string $sNamespace
* @param string $sToolbarId
* @param string $sFilename
* This function is the constructor of the ToolbarDetail class
* @param string $Namespace Name of Plugin
* @param string $ToolbarId (NORMAL, GRID)
* @param string $Filename
*/
public function __construct($sNamespace, $sToolbarId, $sFilename)
public function __construct($Namespace, $ToolbarId, $Filename)
{
$this->sNamespace = $sNamespace;
$this->sToolbarId = $sToolbarId;
$this->sFilename = $sFilename;
$this->Namespace = $Namespace;
$this->ToolbarId = $ToolbarId;
$this->Filename = $Filename;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if toolbar id is equal to params
* @param string $ToolbarId
* @return bool
*/
public function equalToolbarIdTo($ToolbarId)
{
return $ToolbarId == $this->ToolbarId;
}
/**
* Check if file exists to params
* @return bool
*/
public function exitsFile()
{
return file_exists($this->Filename);
}
/**
* Include file
* @return bool
*/
public function includeFile()
{
include($this->Filename);
}
}

View File

@@ -2,22 +2,67 @@
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class TriggerDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class TriggerDetail
{
public $sNamespace;
public $sTriggerId;
public $sTriggerName;
use Attributes;
private $Namespace;
private $TriggerId;
private $TriggerName;
/**
* This function is the constructor of the triggerDetail class
* @param string $sNamespace
* @param string $sTriggerId
* @param string $sTriggerName
* This function is the constructor of the TriggerDetail class
* @param string $Namespace
* @param string $TriggerId
* @param string $TriggerName
*/
public function __construct($sNamespace, $sTriggerId, $sTriggerName)
public function __construct($Namespace, $TriggerId, $TriggerName)
{
$this->sNamespace = $sNamespace;
$this->sTriggerId = $sTriggerId;
$this->sTriggerName = $sTriggerName;
$this->Namespace = $Namespace;
$this->TriggerId = $TriggerId;
$this->TriggerName = $TriggerName;
}
/**
* Get name of plugin
* @return string
*/
public function getNamespace()
{
return $this->Namespace;
}
/**
* Get trigger name
* @return string
*/
public function getTriggerName()
{
return $this->TriggerName;
}
/**
* Check if trigger id is equal to params
* @param string $triggerId
* @return bool
*/
public function equalTriggerId($triggerId)
{
return $triggerId == $this->TriggerId;
}
/**
* Check if nmae of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
}