change
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Maveriks\Extension;
|
||||
use Luracast\Restler\Defaults;
|
||||
use Luracast\Restler\Format\JsonFormat;
|
||||
use Luracast\Restler\Format\UrlEncodedFormat;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use ProcessMaker\Services\Api;
|
||||
use Luracast\Restler\RestException;
|
||||
|
||||
@@ -174,7 +175,7 @@ class Restler extends \Luracast\Restler\Restler
|
||||
{
|
||||
$classReflection = new \ReflectionClass($object);
|
||||
$classShortName = $classReflection->getShortName();
|
||||
$registry = &\PMPluginRegistry::getSingleton();
|
||||
$registry = PluginRegistry::loadSingleton();
|
||||
$pluginsApiExtend = $registry->getExtendsRestService($classShortName);
|
||||
if ($pluginsApiExtend) {
|
||||
$classFilePath = $pluginsApiExtend['filePath'];
|
||||
|
||||
@@ -519,7 +519,7 @@ function run_pack_plugin($task, $args) {
|
||||
|
||||
require_once ($pluginFilename);
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginsRegistry::loadSingleton();
|
||||
$pluginDetail = $oPluginRegistry->getPluginDetails($pluginName . '.php');
|
||||
$fileTar = $pluginHome . PATH_SEP . $pluginName . '-' . $pluginDetail->iVersion . '.tar';
|
||||
|
||||
@@ -2228,7 +2228,7 @@ function run_update_plugin_attributes($task, $args)
|
||||
$pluginName = $args[0];
|
||||
|
||||
//Update plugin attributes
|
||||
$pmPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pmPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
$pmPluginRegistry->updatePluginAttributesInAllWorkspaces($pluginName);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ if (! is_file( XMLFORM_AJAX_PATH . $xmlFile )) {
|
||||
$aux = explode( PATH_SEP, $xmlFile );
|
||||
//check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment
|
||||
if (count( $aux ) == 2 && defined( 'G_PLUGIN_CLASS' )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder( $aux[0] )) {
|
||||
$sPath = PATH_PLUGINS;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ if (isset($ntable->filterForm_Id) && ($ntable->filterForm_Id!=='')) {
|
||||
$aux = explode ( PATH_SEP, G::getUIDName( $ntable->filterForm_Id ) );
|
||||
//check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment
|
||||
if ( count($aux) == 2 && defined ( 'G_PLUGIN_CLASS' ) ) {
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
if ( $oPluginRegistry->isRegisteredFolder($aux[0]) ) {
|
||||
$sPath = PATH_PLUGINS;
|
||||
}
|
||||
|
||||
@@ -389,8 +389,9 @@ class headPublisher
|
||||
if (class_exists('PMPluginRegistry') && defined('SYS_SYS')) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$registeredCss = $oPluginRegistry->getRegisteredCss();
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\CssFile $cssFile */
|
||||
foreach ($registeredCss as $cssFile) {
|
||||
$script .= " <link rel='stylesheet' type='text/css' href='" . $cssFile->sCssFile . ".css' />\n";
|
||||
$script .= " <link rel='stylesheet' type='text/css' href='" . $cssFile->getCssFile() . ".css' />\n";
|
||||
}
|
||||
}
|
||||
return $script;
|
||||
@@ -551,7 +552,7 @@ class headPublisher
|
||||
|
||||
//hook for registered javascripts from plugins
|
||||
if (class_exists('PMPluginRegistry') && defined('SYS_SYS')) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$pluginJavascripts = $oPluginRegistry->getRegisteredJavascriptBy($filename);
|
||||
} else {
|
||||
$pluginJavascripts = array();
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -91,7 +93,7 @@ class Menu
|
||||
if (!is_file($fMenu)) {
|
||||
$aux = explode(PATH_SEP, $strMenuName);
|
||||
if (count($aux) == 2) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder($aux[0])) {
|
||||
$fMenu = PATH_PLUGINS . $aux[0] . PATH_SEP . $aux[1] . ".php";
|
||||
}
|
||||
@@ -103,7 +105,7 @@ class Menu
|
||||
}
|
||||
include ($fMenu);
|
||||
//this line will add options to current menu.
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->getMenus($strMenuName);
|
||||
|
||||
$oMenuFromPlugin = array();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
/**
|
||||
* Publisher class definition
|
||||
* It is to publish all content in a page
|
||||
@@ -174,7 +174,7 @@ class Publisher
|
||||
$aux[1] = $filename;
|
||||
}
|
||||
if (count( $aux ) == 2 && defined( 'G_PLUGIN_CLASS' )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($response = $oPluginRegistry->isRegisteredFolder( $aux[0] )) {
|
||||
if ($response !== true) {
|
||||
$sPath = PATH_PLUGINS . $response . PATH_SEP;
|
||||
@@ -314,7 +314,7 @@ class Publisher
|
||||
if (! is_file( $sPath . $Part['File'] )) {
|
||||
$aux = explode( PATH_SEP, $Part['File'] );
|
||||
if (count( $aux ) == 2) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder( $aux[0] )) {
|
||||
$sPath = PATH_PLUGINS; // . $aux[0] . PATH_SEP ;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ class Publisher
|
||||
|
||||
//search in PLUGINS folder, probably the file is in plugin
|
||||
if (count( $aux ) == 2) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder( $aux[0] )) {
|
||||
$sPath = PATH_PLUGINS; // . $aux[0] . PATH_SEP ;
|
||||
}
|
||||
@@ -573,7 +573,7 @@ class Publisher
|
||||
|
||||
// verify if there are templates folders registered, template and method folders are the same
|
||||
$folderTemplate = explode( '/', $Part['Template'] );
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder( $folderTemplate[0] )) {
|
||||
$template->templateFile = PATH_PLUGINS . $Part['Template'] . '.html';
|
||||
} else {
|
||||
@@ -621,7 +621,7 @@ class Publisher
|
||||
$userTemplate = G::ExpandPath( 'templates' ) . $Part['Template'];
|
||||
$globalTemplate = PATH_TEMPLATE . $Part['Template'];
|
||||
if (! is_file( $userTemplate ) && ! is_file( $globalTemplate )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder( $aux[0] )) {
|
||||
$pluginTemplate = PATH_PLUGINS . $Part['Template'] . '.php';
|
||||
include ($pluginTemplate);
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Class XmlForm_Field
|
||||
*
|
||||
@@ -5492,7 +5495,7 @@ class XmlForm
|
||||
$aux[1] = $filename;
|
||||
}
|
||||
if (count( $aux ) == 2 && defined( 'G_PLUGIN_CLASS' )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($response = $oPluginRegistry->isRegisteredFolder( $aux[0] )) {
|
||||
if ($response !== true) {
|
||||
$sPath = PATH_PLUGINS . $response . PATH_SEP;
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
* @access public
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'USERS' table.
|
||||
*
|
||||
@@ -196,7 +198,7 @@ class RbacUsers extends BaseRbacUsers
|
||||
public function create($aData)
|
||||
{
|
||||
if (class_exists('PMPluginRegistry')) {
|
||||
$pluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($pluginRegistry->existsTrigger(PM_BEFORE_CREATE_USER)) {
|
||||
try {
|
||||
$pluginRegistry->executeTriggers(PM_BEFORE_CREATE_USER, null);
|
||||
|
||||
@@ -256,9 +256,6 @@ try {
|
||||
|
||||
define('TIME_ZONE', ini_get('date.timezone'));
|
||||
|
||||
//Enable Monolog
|
||||
|
||||
|
||||
//Processing
|
||||
eprintln('Processing workspace: ' . $workspace, 'green');
|
||||
|
||||
@@ -314,7 +311,7 @@ function processWorkspace()
|
||||
{
|
||||
try {
|
||||
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
if (file_exists(PATH_DATA_SITE . 'plugin.singleton')) {
|
||||
$oPluginRegistry->unSerializeInstance(file_get_contents(PATH_DATA_SITE . 'plugin.singleton'));
|
||||
}
|
||||
@@ -422,8 +419,6 @@ function unpauseApplications()
|
||||
setExecutionMessage("Unpausing applications");
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$oCases = new Cases();
|
||||
$oCases->ThrowUnpauseDaemon($sNow, 1);
|
||||
|
||||
@@ -467,7 +462,7 @@ function executePlugins()
|
||||
// Executing registered cron files
|
||||
|
||||
// -> Get registered cron files
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$cronFiles = $oPluginRegistry->getCronFiles();
|
||||
|
||||
// -> Execute functions
|
||||
|
||||
@@ -1098,6 +1098,7 @@ function run_migrate_indexing_acv($args, $opts) {
|
||||
function run_migrate_plugin($args, $opts) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
//Check if the command is executed by a specific workspace
|
||||
/** @var workspaceTools $workspace */
|
||||
if (count($workspaces) === 1) {
|
||||
$workspace = array_shift($workspaces);
|
||||
print_r('Regenerating Singleton in: ' . pakeColor::colorize($workspace->name, 'INFO') . "\n");
|
||||
@@ -1106,7 +1107,6 @@ function run_migrate_plugin($args, $opts) {
|
||||
} else {
|
||||
CLI::logging("> Migrating and populating data...\n");
|
||||
$start = microtime(true);
|
||||
/** @var workspaceTools $workspace */
|
||||
foreach ($workspaces as $workspace) {
|
||||
passthru('./processmaker migrate-plugins-singleton-information '.$workspace->name);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class Applications
|
||||
{
|
||||
/**
|
||||
@@ -1133,12 +1136,12 @@ class Applications
|
||||
$caseSteps = $step->getAllCaseSteps( $proUid, $tasUid, $appUid );
|
||||
|
||||
//getting externals steps
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$eSteps = $oPluginRegistry->getSteps();
|
||||
$externalSteps = array ();
|
||||
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\StepDetail $externalStep */
|
||||
foreach ($eSteps as $externalStep) {
|
||||
$externalSteps[$externalStep->sStepId] = $externalStep;
|
||||
$externalSteps[$externalStep->getStepId()] = $externalStep;
|
||||
}
|
||||
|
||||
//getting the case record
|
||||
@@ -1195,11 +1198,11 @@ class Applications
|
||||
break;
|
||||
case 'EXTERNAL':
|
||||
$stepTitle = 'unknown ' . $caseStep->getStepUidObj();
|
||||
$oPluginRegistry = PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$externalStep = $externalSteps[$caseStep->getStepUidObj()];
|
||||
$stepItem['id'] = $externalStep->sStepId;
|
||||
$stepItem['title'] = $externalStep->sStepTitle;
|
||||
$stepItem['url'] = "cases/cases_Step?UID={$externalStep->sStepId}&TYPE=EXTERNAL&POSITION=$stepPosition&ACTION=EDIT";
|
||||
$stepItem['id'] = $externalStep->getStepId();
|
||||
$stepItem['title'] = $externalStep->getStepTitle();
|
||||
$stepItem['url'] = "cases/cases_Step?UID={$externalStep->getStepId()}&TYPE=EXTERNAL&POSITION=$stepPosition&ACTION=EDIT";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* A Cases object where you can do start, load, update, refresh about cases
|
||||
@@ -2267,7 +2268,7 @@ class Cases
|
||||
$newValues['APP_TITLE'],
|
||||
$sUsrUid
|
||||
);
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->executeTriggers(PM_CREATE_CASE, $folderData);
|
||||
}
|
||||
$this->getExecuteTriggerProcess($sAppUid, 'CREATE');
|
||||
@@ -3539,7 +3540,7 @@ class Cases
|
||||
$_SESSION['PROCESS'], $sApplicationUID, $_SESSION['TASK'], $_SESSION['USER_LOGGED'], $ACTION = 'DELETE'
|
||||
);
|
||||
$listing = false;
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {
|
||||
$folderData = new folderData(null, null, $sApplicationUID, null, $_SESSION['USER_LOGGED']);
|
||||
$folderData->PMType = "INPUT";
|
||||
@@ -3880,7 +3881,7 @@ class Cases
|
||||
}
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
if ($pluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists("uploadDocumentData")) {
|
||||
$triggerDetail = $pluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
|
||||
@@ -4637,12 +4638,11 @@ class Cases
|
||||
$confEnvSetting = $conf->getFormats();
|
||||
|
||||
$listing = false;
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {
|
||||
$folderData = new folderData(null, null, $sApplicationUID, null, $sUserUID);
|
||||
$folderData->PMType = "INPUT";
|
||||
$folderData->returnList = true;
|
||||
//$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$listing = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
|
||||
}
|
||||
|
||||
@@ -4944,12 +4944,11 @@ class Cases
|
||||
|
||||
$confEnvSetting = $conf->getFormats();
|
||||
$listing = false;
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {
|
||||
$folderData = new folderData(null, null, $sApplicationUID, null, $sUserUID);
|
||||
$folderData->PMType = "OUTPUT";
|
||||
$folderData->returnList = true;
|
||||
//$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$listing = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once 'class.pluginRegistry.php';
|
||||
|
||||
define('G_PLUGIN_CLASS', 1);
|
||||
@@ -84,9 +86,8 @@ class PMPlugin
|
||||
*/
|
||||
public function registerMenu($menuId, $menuFilename)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$sMenuFilename = ($this->sClassName == 'enterprisePlugin') ? PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . $menuFilename : PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . $menuFilename;
|
||||
$oPluginRegistry->registerMenu($this->sNamespace, $menuId, $sMenuFilename);
|
||||
PluginRegistry::loadSingleton()->registerMenu($this->sNamespace, $menuId, $sMenuFilename);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,8 +97,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerDashlets()
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerDashlets($this->sNamespace);
|
||||
PluginRegistry::loadSingleton()->registerDashlets($this->sNamespace);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,8 +107,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerReport()
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerReport($this->sNamespace);
|
||||
PluginRegistry::loadSingleton()->registerReport($this->sNamespace);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,8 +117,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerPmFunction()
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerPmFunction($this->sNamespace);
|
||||
PluginRegistry::loadSingleton()->registerPmFunction($this->sNamespace);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,8 +127,7 @@ class PMPlugin
|
||||
*/
|
||||
public function setCompanyLogo($filename)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->setCompanyLogo($this->sNamespace, $filename);
|
||||
PluginRegistry::loadSingleton()->setCompanyLogo($this->sNamespace, $filename);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,8 +137,7 @@ class PMPlugin
|
||||
*/
|
||||
public function redirectLogin($role, $pathMethod)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerRedirectLogin($this->sNamespace, $role, $pathMethod);
|
||||
PluginRegistry::loadSingleton()->registerRedirectLogin($this->sNamespace, $role, $pathMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,8 +147,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerFolder($sFolderId, $sFolderName)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerFolder($this->sNamespace, $sFolderId, $sFolderName);
|
||||
PluginRegistry::loadSingleton()->registerFolder($this->sNamespace, $sFolderId, $sFolderName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,8 +157,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerStep($sStepId, $sStepName, $sStepTitle, $sSetupStepPage = '')
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerStep( $this->sNamespace, $sStepId, $sStepName, $sStepTitle, $sSetupStepPage );
|
||||
PluginRegistry::loadSingleton()->registerStep( $this->sNamespace, $sStepId, $sStepName, $sStepTitle, $sSetupStepPage );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,8 +168,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerTrigger($sTriggerId, $sTriggerName)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerTrigger($this->sNamespace, $sTriggerId, $sTriggerName);
|
||||
PluginRegistry::loadSingleton()->registerTrigger($this->sNamespace, $sTriggerId, $sTriggerName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,9 +236,8 @@ class PMPlugin
|
||||
*/
|
||||
public function registerBreakPageTemplate($pageId, $templateFilename)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$sPageFilename = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . $templateFilename;
|
||||
$oPluginRegistry->registerBreakPageTemplate ($this->sNamespace, $pageId, $sPageFilename);
|
||||
PluginRegistry::loadSingleton()->registerBreakPageTemplate ($this->sNamespace, $pageId, $sPageFilename);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -255,8 +247,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerCss($sCssFile)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerCss($this->sNamespace, $sCssFile);
|
||||
PluginRegistry::loadSingleton()->registerCss($this->sNamespace, $sCssFile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -267,9 +258,8 @@ class PMPlugin
|
||||
*/
|
||||
public function registerToolbarFile($sToolbarId, $filename)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$sFilename = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . $filename;
|
||||
$oPluginRegistry->registerToolbarFile($this->sNamespace, $sToolbarId, $sFilename);
|
||||
PluginRegistry::loadSingleton()->registerToolbarFile($this->sNamespace, $sToolbarId, $sFilename);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,8 +274,7 @@ class PMPlugin
|
||||
$sActionExecute,
|
||||
$sActionGetFields
|
||||
) {
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerCaseSchedulerPlugin(
|
||||
PluginRegistry::loadSingleton()->registerCaseSchedulerPlugin(
|
||||
$this->sNamespace, $sActionId, $sActionForm, $sActionSave, $sActionExecute, $sActionGetFields
|
||||
);
|
||||
}
|
||||
@@ -297,8 +286,7 @@ class PMPlugin
|
||||
*/
|
||||
public function registerTaskExtendedProperty($sPage, $sName, $sIcon="")
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerTaskExtendedProperty ( $this->sNamespace, $sPage, $sName, $sIcon );
|
||||
PluginRegistry::loadSingleton()->registerTaskExtendedProperty ( $this->sNamespace, $sPage, $sName, $sIcon );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,8 +297,7 @@ class PMPlugin
|
||||
*/
|
||||
function registerJavascript($sCoreJsFile, $pluginJsFile)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerJavascript($this->sNamespace, $sCoreJsFile, $pluginJsFile);
|
||||
PluginRegistry::loadSingleton()->registerJavascript($this->sNamespace, $sCoreJsFile, $pluginJsFile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -321,8 +308,7 @@ class PMPlugin
|
||||
*/
|
||||
public function unregisterJavascript($sCoreJsFile, $pluginJsFile)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->unregisterJavascript($this->sNamespace, $sCoreJsFile, $pluginJsFile);
|
||||
PluginRegistry::loadSingleton()->unregisterJavascript($this->sNamespace, $sCoreJsFile, $pluginJsFile);
|
||||
}
|
||||
|
||||
public function registerDashboard()
|
||||
@@ -331,8 +317,7 @@ class PMPlugin
|
||||
|
||||
public function getExternalStepAction()
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
return $oPluginRegistry->getSteps();
|
||||
return PluginRegistry::loadSingleton()->getSteps();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -345,8 +330,7 @@ class PMPlugin
|
||||
*/
|
||||
function registerRestService()
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerRestService($this->sNamespace);
|
||||
PluginRegistry::loadSingleton()->registerRestService($this->sNamespace);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -356,8 +340,7 @@ class PMPlugin
|
||||
*/
|
||||
function registerExtendsRestService($className)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerExtendsRestService($this->sNamespace, $className);
|
||||
PluginRegistry::loadSingleton()->registerExtendsRestService($this->sNamespace, $className);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -367,8 +350,7 @@ class PMPlugin
|
||||
*/
|
||||
function disableExtendsRestService($className)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->disableExtendsRestService($this->sNamespace, $className);
|
||||
PluginRegistry::loadSingleton()->disableExtendsRestService($this->sNamespace, $className);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -381,8 +363,7 @@ class PMPlugin
|
||||
*/
|
||||
function unregisterRestService($classname, $path)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->unregisterRestService($this->sNamespace, $classname, $path);
|
||||
PluginRegistry::loadSingleton()->unregisterRestService($this->sNamespace, $classname, $path);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -392,14 +373,12 @@ class PMPlugin
|
||||
*/
|
||||
public function registerCronFile($cronFile)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerCronFile($this->sNamespace, $cronFile);
|
||||
PluginRegistry::loadSingleton()->registerCronFile($this->sNamespace, $cronFile);
|
||||
}
|
||||
|
||||
function enableRestService($enable)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->enableRestService($this->sNamespace, $enable);
|
||||
PluginRegistry::loadSingleton()->enableRestService($this->sNamespace, $enable);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -412,8 +391,7 @@ class PMPlugin
|
||||
public function registerDesignerMenu($file)
|
||||
{
|
||||
try {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry->registerDesignerMenu($this->sNamespace, $file);
|
||||
PluginRegistry::loadSingleton()->registerDesignerMenu($this->sNamespace, $file);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -431,8 +409,7 @@ class PMPlugin
|
||||
public function registerMenuOptionsToReplace($from = array(), $options = array())
|
||||
{
|
||||
try {
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerMenuOptionsToReplace($this->sNamespace, $from, $options);
|
||||
PluginRegistry::loadSingleton()->registerMenuOptionsToReplace($this->sNamespace, $from, $options);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -448,8 +425,7 @@ class PMPlugin
|
||||
public function registerImportProcessCallback($callBackFile = '')
|
||||
{
|
||||
try {
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerImportProcessCallback($this->sNamespace, $callBackFile);
|
||||
PluginRegistry::loadSingleton()->registerImportProcessCallback($this->sNamespace, $callBackFile);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -465,8 +441,7 @@ class PMPlugin
|
||||
public function registerOpenReassignCallback($callBackFile = '')
|
||||
{
|
||||
try {
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerOpenReassignCallback($callBackFile);
|
||||
PluginRegistry::loadSingleton()->registerOpenReassignCallback($callBackFile);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -484,8 +459,7 @@ class PMPlugin
|
||||
$scope = '/plugin/' . $this->sNamespace . '/';
|
||||
}
|
||||
try {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry->registerDesignerSourcePath($this->sNamespace, $scope . $pathFile);
|
||||
PluginRegistry::loadSingleton()->registerDesignerSourcePath($this->sNamespace, $scope . $pathFile);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class PMPluginRegistry
|
||||
*/
|
||||
public static function getSingleton()
|
||||
{
|
||||
return \ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
return \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +154,7 @@ class PMPluginRegistry
|
||||
*/
|
||||
public static function loadSingleton($file)
|
||||
{
|
||||
return \ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
return \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once 'classes/interfaces/dashletInterface.php';
|
||||
require_once 'classes/model/Dashlet.php';
|
||||
require_once 'classes/model/DashletInstance.php';
|
||||
@@ -361,7 +363,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
|
||||
//---- verify the name plugin of the class
|
||||
$pluginName = '';
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginsDashlets = $oPluginRegistry->getDashlets();
|
||||
|
||||
foreach ($pluginsDashlets as $pluginDashlet) {
|
||||
@@ -381,12 +383,8 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
if (strpos( $file, '.php', 1 ) && is_file( PATH_PLUGINS . $file )) {
|
||||
include_once (PATH_PLUGINS . $file);
|
||||
$pluginDetail = $oPluginRegistry->getPluginDetails( $file );
|
||||
if ($pluginDetail->sNamespace == $pluginName) {
|
||||
if ($pluginDetail->enabled == '1') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if ($pluginDetail->getNamespace() == $pluginName) {
|
||||
return $pluginDetail->isEnabled();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -398,7 +396,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
|
||||
private static function setIncludePath ()
|
||||
{
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginsDashlets = $oPluginRegistry->getDashlets();
|
||||
foreach ($pluginsDashlets as $pluginDashlet) {
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . PATH_PLUGINS . $pluginDashlet . PATH_SEP );
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
//
|
||||
// License: LGPL, see LICENSE
|
||||
////////////////////////////////////////////////////
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use ProcessMaker\Util\ElementTranslation;
|
||||
|
||||
|
||||
@@ -248,9 +249,6 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
|
||||
((isset($blackList['tables']))? $blackList['tables'] : '') .
|
||||
((isset($blackList['pmtables']))? $blackList['pmtables'] : '')
|
||||
);
|
||||
if (!class_exists('PHPSQLParser')) {
|
||||
|
||||
}
|
||||
$parseSqlStm = new PHPSQLParser($SqlStatement);
|
||||
try {
|
||||
//Parsing queries and check the blacklist
|
||||
@@ -1840,10 +1838,11 @@ function PMFGenerateOutputDocument ($outputID, $sApplication = null, $index = nu
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\TriggerDetail $triggerDetail */
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->sNamespace;
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->getNamespace();
|
||||
|
||||
$oAppDocument1 = new AppDocument();
|
||||
$oAppDocument1->update( $aFields );
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.enterpriseUtils.php';
|
||||
|
||||
/**
|
||||
@@ -133,20 +136,20 @@ class pmLicenseManager
|
||||
if ($this->result=="OK") {
|
||||
//Disable
|
||||
if (file_exists ( PATH_PLUGINS . 'enterprise/data/data' )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton ();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aPlugins = unserialize ( trim ( file_get_contents ( PATH_PLUGINS . 'enterprise/data/data' ) ) );
|
||||
foreach ($aPlugins as $aPlugin) {
|
||||
$sClassName = substr ( $aPlugin ['sFilename'], 0, strpos ( $aPlugin ['sFilename'], '-' ) );
|
||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
||||
$oPluginRegistry->disablePlugin ( $oDetails->sNamespace );
|
||||
file_put_contents ( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance () );
|
||||
$oPluginRegistry->disablePlugin ( $oDetails->getNamespace() );
|
||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||
}
|
||||
unlink(PATH_PLUGINS . 'enterprise/data/data');
|
||||
}
|
||||
|
||||
//Enable
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . "enterprise/data/default")));
|
||||
|
||||
foreach ($aPlugins as $aPlugin) {
|
||||
@@ -154,8 +157,8 @@ class pmLicenseManager
|
||||
$sClassName = substr($aPlugin["sFilename"], 0, strpos($aPlugin["sFilename"], "-"));
|
||||
require_once (PATH_PLUGINS . $sClassName . ".php");
|
||||
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . ".php");
|
||||
$oPluginRegistry->enablePlugin($oDetails->sNamespace);
|
||||
file_put_contents ( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance () );
|
||||
$oPluginRegistry->enablePlugin($oDetails->getNamespace());
|
||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,9 +171,9 @@ class pmLicenseManager
|
||||
if (file_exists(PATH_PLUGINS . $sClassName . '.php')) {
|
||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
||||
$oPluginRegistry->disablePlugin ( $oDetails->sNamespace );
|
||||
file_put_contents ( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance () );
|
||||
$aDenied[]=$oDetails->sNamespace;
|
||||
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||
$aDenied[]=$oDetails->getNamespace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,7 +185,7 @@ class pmLicenseManager
|
||||
}
|
||||
} else {
|
||||
//Disable
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton ();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aPlugins = unserialize ( trim ( file_get_contents ( PATH_PLUGINS . 'enterprise/data/default' ) ) );
|
||||
foreach ($aPlugins as $aPlugin) {
|
||||
$sClassName = substr ( $aPlugin ['sFilename'], 0, strpos ( $aPlugin ['sFilename'], '-' ) );
|
||||
@@ -190,13 +193,14 @@ class pmLicenseManager
|
||||
if (($sClassName != "pmLicenseManager") && ($sClassName != "pmTrial") && ($sClassName != "enterprise")) {
|
||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
||||
$oPluginRegistry->disablePlugin ( $oDetails->sNamespace );
|
||||
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||
} else {
|
||||
//Enable default and required plugins
|
||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
||||
$oPluginRegistry->enablePlugin ( $oDetails->sNamespace );
|
||||
$oPluginRegistry->enablePlugin($oDetails->getNamespace());
|
||||
}
|
||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||
}
|
||||
|
||||
if (file_exists(PATH_DATA_SITE.'ee')) {
|
||||
@@ -210,12 +214,12 @@ class pmLicenseManager
|
||||
}
|
||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
||||
if ($oDetails) {
|
||||
$oPluginRegistry->disablePlugin ( $oDetails->sNamespace );
|
||||
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
file_put_contents ( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance () );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
// License: LGPL, see LICENSE
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* PMScript - PMScript class
|
||||
@@ -59,7 +60,7 @@ if (defined('SYS_SYS') && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPAC
|
||||
//call plugin
|
||||
if (class_exists( 'folderData' )) {
|
||||
//$folderData = new folderData($sProUid, $proFields['PRO_TITLE'], $sAppUid, $Fields['APP_TITLE'], $sUsrUid);
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aAvailablePmFunctions = $oPluginRegistry->getPmFunctions();
|
||||
foreach ($aAvailablePmFunctions as $key => $class) {
|
||||
$filePlugin = PATH_PLUGINS . $class . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php';
|
||||
|
||||
0
workflow/engine/classes/class.processMap.php
Normal file
0
workflow/engine/classes/class.processMap.php
Normal file
@@ -25,6 +25,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Class pagedTable
|
||||
*
|
||||
@@ -581,7 +583,7 @@ class propelTable
|
||||
$time = $time_end - $time_start;
|
||||
// verify if there are templates folders registered, template and method folders are the same
|
||||
$folderTemplate = explode( '/', $this->template );
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->isRegisteredFolder( $folderTemplate[0] )) {
|
||||
$templateFile = PATH_PLUGINS . $this->template . '.html';
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* This class Helps registering and implementing Wizard for Triggers
|
||||
*/
|
||||
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -33,7 +33,7 @@ class triggerLibrary
|
||||
//Register all registered PLugin Functions
|
||||
if (class_exists( 'folderData' )) {
|
||||
//$folderData = new folderData($sProUid, $proFields['PRO_TITLE'], $sAppUid, $Fields['APP_TITLE'], $sUsrUid);
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aAvailablePmFunctions = $oPluginRegistry->getPmFunctions();
|
||||
$oPluginRegistry->setupPlugins(); //Get and setup enabled plugins
|
||||
foreach ($aAvailablePmFunctions as $key => $class) {
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* @author Alexandre Rosenfeld
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
|
||||
/**
|
||||
* class workspaceTools
|
||||
*
|
||||
@@ -1892,8 +1894,6 @@ class workspaceTools
|
||||
}
|
||||
|
||||
if ($swv == 1) {
|
||||
|
||||
|
||||
//Extract
|
||||
$tar = new Archive_Tar($f);
|
||||
|
||||
@@ -2862,7 +2862,6 @@ class workspaceTools
|
||||
public function checkRbacPermissions(){
|
||||
CLI::logging("-> Verifying roles permissions in RBAC \n");
|
||||
//Update table RBAC permissions
|
||||
|
||||
$RBAC = &RBAC::getSingleton();
|
||||
$RBAC->initRBAC();
|
||||
$result = $RBAC->verifyPermissions();
|
||||
@@ -3887,15 +3886,15 @@ class workspaceTools
|
||||
if (!$bExist = $conf->exists('MIGRATED_PLUGIN', 'singleton')) {
|
||||
$pathSingleton = PATH_DATA . 'sites' . PATH_SEP . $workspace . PATH_SEP . 'plugin.singleton';
|
||||
$oPluginRegistry = unserialize(file_get_contents($pathSingleton));
|
||||
$pluginAdapter = new \ProcessMaker\Plugins\Adapters\PluginAdapter();
|
||||
$pluginAdapter->save($oPluginRegistry);
|
||||
$data["CFG_UID"] = 'MIGRATED_PLUGIN';
|
||||
$data["OBJ_UID"] = 'singleton';
|
||||
$data["CFG_VALUE"] = 'true';
|
||||
$data["PRO_UID"] = '';
|
||||
$data["USR_UID"] = '';
|
||||
$data["APP_UID"] = '';
|
||||
$conf->create($data);
|
||||
$pluginAdapter = new PluginAdapter();
|
||||
$pluginAdapter->migrate($oPluginRegistry);
|
||||
// $data["CFG_UID"] = 'MIGRATED_PLUGIN';
|
||||
// $data["OBJ_UID"] = 'singleton';
|
||||
// $data["CFG_VALUE"] = 'true';
|
||||
// $data["PRO_UID"] = '';
|
||||
// $data["USR_UID"] = '';
|
||||
// $data["APP_UID"] = '';
|
||||
// $conf->create($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once 'classes/model/om/BaseAddonsManager.php';
|
||||
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.enterpriseUtils.php';
|
||||
|
||||
@@ -113,9 +116,8 @@ class AddonsManager extends BaseAddonsManager
|
||||
if (!$this->isInstalled()) {
|
||||
return false;
|
||||
}
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$status = $oPluginRegistry->getStatusPlugin($this->getAddonName());
|
||||
return (strcmp($status, "enabled") == 0);
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
return $oPluginRegistry->isEnable($this->getAddonName());
|
||||
} else {
|
||||
throw new Exception("Addon type '{$this->getAddonType()}' unsupported");
|
||||
}
|
||||
@@ -130,7 +132,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
return false;
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
|
||||
$filter = new InputFilter();
|
||||
@@ -139,17 +141,12 @@ class AddonsManager extends BaseAddonsManager
|
||||
require_once ($requiredPath);
|
||||
|
||||
if ($enable) {
|
||||
//$oDetails = $oPluginRegistry->getPluginDetails($this->getAddonName());
|
||||
//$oPluginRegistry->enablePlugin($oDetails->sNamespace);
|
||||
//require_once (PATH_PLUGINS . $this->getAddonName() . ".php"); //ok
|
||||
$oPluginRegistry->enablePlugin($this->getAddonName());
|
||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||
} else {
|
||||
//$oDetails = $oPluginRegistry->getPluginDetails($this->getAddonName());
|
||||
//$oPluginRegistry->disablePlugin($oDetails->sNamespace);
|
||||
$oPluginRegistry->disablePlugin($this->getAddonName());
|
||||
}
|
||||
$oPluginRegistry->pluginAdapter->savePlugin($this->getAddonName(), $oPluginRegistry);
|
||||
$oPluginRegistry->savePlugin($this->getAddonName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -168,9 +165,9 @@ class AddonsManager extends BaseAddonsManager
|
||||
return (null);
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$details = $oPluginRegistry->getPluginDetails($this->getAddonName() . ".php");
|
||||
$v = (!($details == null))? $details->iVersion : null;
|
||||
$v = (!($details == null))? $details->getVersion() : null;
|
||||
|
||||
if ($v != "") {
|
||||
return ($v);
|
||||
@@ -385,7 +382,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
$_SESSION["__ENTERPRISE_INSTALL__"] = 1;
|
||||
}
|
||||
|
||||
$oPluginRegistry = &ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->installPluginArchive($filename, $this->getAddonName());
|
||||
|
||||
$this->setState();
|
||||
@@ -408,7 +405,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
return false;
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->uninstallPlugin($this->getAddonName());
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once 'classes/model/om/BaseAddonsStore.php';
|
||||
|
||||
define("STORE_VERSION", 1);
|
||||
@@ -348,7 +351,7 @@ class AddonsStore extends BaseAddonsStore
|
||||
//Fill with local information
|
||||
|
||||
//List all plugins installed
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aPluginsPP = array();
|
||||
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
@@ -368,10 +371,10 @@ class AddonsStore extends BaseAddonsStore
|
||||
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php');
|
||||
|
||||
if ($oDetails) {
|
||||
$sStatus = $oDetails->enabled ? G::LoadTranslation('ID_ENABLED') : G::LoadTranslation('ID_DISABLED');
|
||||
$sStatus = $oDetails->isEnabled() ? G::LoadTranslation('ID_ENABLED') : G::LoadTranslation('ID_DISABLED');
|
||||
|
||||
if (isset($oDetails->aWorkspaces)) {
|
||||
if (!in_array(SYS_SYS, $oDetails->aWorkspaces)) {
|
||||
if ($oDetails->getWorkspaces()) {
|
||||
if (!in_array(SYS_SYS, $oDetails->getWorkspaces())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -380,16 +383,16 @@ class AddonsStore extends BaseAddonsStore
|
||||
continue;
|
||||
}
|
||||
|
||||
$sEdit = (($oDetails->sSetupPage != '') && ($oDetails->enabled)? G::LoadTranslation('ID_SETUP') : ' ');
|
||||
$sEdit = (($oDetails->getSetupPage() != '') && ($oDetails->isEnabled())? G::LoadTranslation('ID_SETUP') : ' ');
|
||||
$aPlugin = array();
|
||||
$aPluginId = $sClassName;
|
||||
$aPluginTitle = $oDetails->sFriendlyName;
|
||||
$aPluginDescription = $oDetails->sDescription;
|
||||
$aPluginVersion = $oDetails->iVersion;
|
||||
$aPluginTitle = $oDetails->getFriendlyName();
|
||||
$aPluginDescription = $oDetails->getDescription();
|
||||
$aPluginVersion = $oDetails->getVersion();
|
||||
|
||||
if (@in_array($sClassName, $pmLicenseManagerO->features)) {
|
||||
$aPluginStatus = $sStatus;
|
||||
$aPluginLinkStatus = 'pluginsChange?id=' . $sClassName . '.php&status=' . $oDetails->enabled;
|
||||
$aPluginLinkStatus = 'pluginsChange?id=' . $sClassName . '.php&status=' . $oDetails->isEnabled();
|
||||
$aPluginEdit = $sEdit;
|
||||
$aPluginLinkEdit = 'pluginsSetup?id=' . $sClassName . '.php';
|
||||
$aPluginStatusA = $sStatus == "Enabled" ? "installed" : 'disabled';
|
||||
|
||||
@@ -292,7 +292,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
}
|
||||
|
||||
if ($flagActionsByEmail) {
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->executeTriggers(PM_CREATE_NEW_DELEGATION, $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
//require_once 'classes/model/om/BaseAppFolder.php';
|
||||
//require_once 'classes/model/Application.php';
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'APP_FOLDER' table.
|
||||
@@ -724,7 +725,7 @@ class AppFolder extends BaseAppFolder
|
||||
}
|
||||
|
||||
if (! empty( $row1["APP_DOC_PLUGIN"] )) {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginName = $row1["APP_DOC_PLUGIN"];
|
||||
$fieldValue = "";
|
||||
|
||||
@@ -732,7 +733,7 @@ class AppFolder extends BaseAppFolder
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails( $pluginName . ".php" );
|
||||
|
||||
if ($pluginDetail) {
|
||||
if ($pluginDetail->enabled) {
|
||||
if ($pluginDetail->isEnabled()) {
|
||||
require_once (PATH_PLUGINS . $pluginName . ".php");
|
||||
$pluginNameClass = $pluginName . "Plugin";
|
||||
$objPluginClass = new $pluginNameClass( $pluginName );
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
//require_once 'classes/model/Process.php';
|
||||
//require_once 'classes/model/Task.php';
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'CASE_SCHEDULER' table.
|
||||
@@ -448,6 +449,8 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
|
||||
$params = array("sessionId" => $sessionId, "processId" => $processId, "taskId" => $taskId, "variables" => array());
|
||||
|
||||
//Here we are loading all plugins registered
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
//If this Job was was registered to be performed by a plugin
|
||||
if (isset($row["CASE_SH_PLUGIN_UID"]) && $row["CASE_SH_PLUGIN_UID"] != "") {
|
||||
//Check if the plugin is active
|
||||
@@ -455,18 +458,7 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
|
||||
if (count($pluginParts) == 2) {
|
||||
|
||||
//Here we are loading all plugins registered
|
||||
//The singleton has a list of enabled plugins
|
||||
$sSerializedFile = PATH_DATA_SITE . "plugin.singleton";
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
if (file_exists($sSerializedFile)) {
|
||||
$oPluginRegistry->unSerializeInstance(file_get_contents($sSerializedFile));
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||
|
||||
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPlugin) {
|
||||
if (isset($caseSchedulerPlugin->sNamespace) && $caseSchedulerPlugin->sNamespace == $pluginParts[0] && isset($caseSchedulerPlugin->sActionId) && $caseSchedulerPlugin->sActionId == $pluginParts[1]) {
|
||||
$caseSchedulerSelected = $caseSchedulerPlugin;
|
||||
@@ -498,8 +490,6 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
$paramsAux = $params;
|
||||
$paramsAux["executeTriggers"] = 1;
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
if ($oPluginRegistry->existsTrigger(PM_SCHEDULER_CREATE_CASE_BEFORE)) {
|
||||
$oPluginRegistry->executeTriggers(PM_SCHEDULER_CREATE_CASE_BEFORE, $paramsAux);
|
||||
}
|
||||
|
||||
@@ -17,23 +17,44 @@ require_once 'classes/model/om/BasePluginsRegistry.php';
|
||||
class PluginsRegistry extends BasePluginsRegistry
|
||||
{
|
||||
/**
|
||||
* Load all Plugins
|
||||
* @param string $keyType
|
||||
* @return array
|
||||
* @throws Exception
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function loadPlugins()
|
||||
public static function loadPlugins($keyType = BasePeer::TYPE_FIELDNAME)
|
||||
{
|
||||
$oCriteria = new Criteria();
|
||||
$oDataset = PluginsRegistryPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rows = array();
|
||||
while ($oDataset->next()) {
|
||||
$rows[] = $oDataset->getRow();
|
||||
$criteria = new Criteria();
|
||||
$dataSet = PluginsRegistryPeer::doSelect($criteria);
|
||||
$plugins = [];
|
||||
/** @var PluginsRegistry $row */
|
||||
foreach ($dataSet as $row) {
|
||||
$plugins[] = $row->toArray($keyType);
|
||||
}
|
||||
return $rows;
|
||||
return $plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $prUid
|
||||
* Get all Plugins Enabled
|
||||
* @param string $keyType
|
||||
* @return array
|
||||
*/
|
||||
public static function getPluginsEnabled($keyType = BasePeer::TYPE_FIELDNAME)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_ENABLE, true);
|
||||
$dataSet = PluginsRegistryPeer::doSelect($criteria);
|
||||
$plugins = [];
|
||||
/** @var PluginsRegistry $row */
|
||||
foreach ($dataSet as $row) {
|
||||
$plugins[] = $row->toArray($keyType);
|
||||
}
|
||||
return $plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load plugin with Uid
|
||||
* @param string $prUid
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -50,6 +71,7 @@ class PluginsRegistry extends BasePluginsRegistry
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is a plugin uid
|
||||
* @param $prUid
|
||||
* @return mixed|bool
|
||||
*/
|
||||
@@ -64,11 +86,14 @@ class PluginsRegistry extends BasePluginsRegistry
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $prUid
|
||||
* Load or creates if the record does not exist
|
||||
* Load and makes a union with the data sent
|
||||
*
|
||||
* @param string $prUid
|
||||
* @param array $pluginData
|
||||
* @return mixed|array|bool
|
||||
* @return array
|
||||
*/
|
||||
public static function loadOrCreateIfNotExists($prUid, $pluginData = array())
|
||||
public static function loadOrCreateIfNotExists($prUid, $pluginData = [])
|
||||
{
|
||||
if (!self::exists($prUid)) {
|
||||
$pluginData['PR_UID'] = $prUid;
|
||||
@@ -135,4 +160,64 @@ class PluginsRegistry extends BasePluginsRegistry
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
|
||||
public static function enable($Namespace)
|
||||
{
|
||||
$oConnection = Propel::getConnection(PluginsRegistryPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oPluginsRegistry = PluginsRegistryPeer::retrieveByPK(md5($Namespace));
|
||||
if ($oPluginsRegistry) {
|
||||
$oPluginsRegistry->fromArray(['PLUGIN_ENABLE' => true], BasePeer::TYPE_FIELDNAME);
|
||||
if ($oPluginsRegistry->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oPluginsRegistry->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oPluginsRegistry->getValidationFailures();
|
||||
/** @var ValidationFailed $oValidationFailure */
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw (new Exception('The registry cannot be updated!<br />' . $sMessage));
|
||||
}
|
||||
} else {
|
||||
throw (new Exception('This Plugin doesn\'t exist!'));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
|
||||
public static function disable($Namespace)
|
||||
{
|
||||
$oConnection = Propel::getConnection(PluginsRegistryPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oPluginsRegistry = PluginsRegistryPeer::retrieveByPK(md5($Namespace));
|
||||
if ($oPluginsRegistry) {
|
||||
$oPluginsRegistry->fromArray(['PLUGIN_ENABLE' => false], BasePeer::TYPE_FIELDNAME);
|
||||
if ($oPluginsRegistry->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oPluginsRegistry->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oPluginsRegistry->getValidationFailures();
|
||||
/** @var ValidationFailed $oValidationFailure */
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw (new Exception('The registry cannot be updated!<br />' . $sMessage));
|
||||
}
|
||||
} else {
|
||||
throw (new Exception('This Plugin doesn\'t exist!'));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once 'classes/model/om/BaseUsersProperties.php';
|
||||
|
||||
/**
|
||||
@@ -320,7 +322,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
$userRole = $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'];
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aRedirectLogin = $oPluginRegistry->getRedirectLogins();
|
||||
if (isset( $aRedirectLogin ) && is_array( $aRedirectLogin )) {
|
||||
foreach ($aRedirectLogin as $key => $detail) {
|
||||
|
||||
@@ -73,14 +73,20 @@ class PluginsRegistryMapBuilder
|
||||
|
||||
$tMap->addColumn('PLUGIN_DESCRIPTION', 'PluginDescription', 'string', CreoleTypes::VARCHAR, false, 200);
|
||||
|
||||
$tMap->addColumn('CLASS_NAME', 'ClassName', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
$tMap->addColumn('PLUGIN_CLASS_NAME', 'PluginClassName', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('FRIENDLY_NAME', 'FriendlyName', 'string', CreoleTypes::VARCHAR, false, 150);
|
||||
$tMap->addColumn('PLUGIN_FRIENDLY_NAME', 'PluginFriendlyName', 'string', CreoleTypes::VARCHAR, false, 150);
|
||||
|
||||
$tMap->addColumn('FILE_NAME', 'FileName', 'string', CreoleTypes::VARCHAR, true, 250);
|
||||
$tMap->addColumn('PLUGIN_FILE', 'PluginFile', 'string', CreoleTypes::VARCHAR, true, 250);
|
||||
|
||||
$tMap->addColumn('PLUGIN_FOLDER', 'PluginFolder', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('PLUGIN_SETUP_PAGE', 'PluginSetupPage', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('PLUGIN_COMPANY_LOGO', 'PluginCompanyLogo', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('PLUGIN_WORKSPACES', 'PluginWorkspaces', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('PLUGIN_VERSION', 'PluginVersion', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('PLUGIN_ENABLE', 'PluginEnable', 'boolean', CreoleTypes::BOOLEAN, false, null);
|
||||
|
||||
@@ -52,22 +52,22 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
protected $plugin_description = '';
|
||||
|
||||
/**
|
||||
* The value for the class_name field.
|
||||
* The value for the plugin_class_name field.
|
||||
* @var string
|
||||
*/
|
||||
protected $class_name;
|
||||
protected $plugin_class_name;
|
||||
|
||||
/**
|
||||
* The value for the friendly_name field.
|
||||
* The value for the plugin_friendly_name field.
|
||||
* @var string
|
||||
*/
|
||||
protected $friendly_name = '';
|
||||
protected $plugin_friendly_name = '';
|
||||
|
||||
/**
|
||||
* The value for the file_name field.
|
||||
* The value for the plugin_file field.
|
||||
* @var string
|
||||
*/
|
||||
protected $file_name = '';
|
||||
protected $plugin_file = '';
|
||||
|
||||
/**
|
||||
* The value for the plugin_folder field.
|
||||
@@ -75,6 +75,24 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $plugin_folder = '';
|
||||
|
||||
/**
|
||||
* The value for the plugin_setup_page field.
|
||||
* @var string
|
||||
*/
|
||||
protected $plugin_setup_page = '';
|
||||
|
||||
/**
|
||||
* The value for the plugin_company_logo field.
|
||||
* @var string
|
||||
*/
|
||||
protected $plugin_company_logo = '';
|
||||
|
||||
/**
|
||||
* The value for the plugin_workspaces field.
|
||||
* @var string
|
||||
*/
|
||||
protected $plugin_workspaces = '';
|
||||
|
||||
/**
|
||||
* The value for the plugin_version field.
|
||||
* @var string
|
||||
@@ -212,36 +230,36 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [class_name] column value.
|
||||
* Get the [plugin_class_name] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClassName()
|
||||
public function getPluginClassName()
|
||||
{
|
||||
|
||||
return $this->class_name;
|
||||
return $this->plugin_class_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [friendly_name] column value.
|
||||
* Get the [plugin_friendly_name] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFriendlyName()
|
||||
public function getPluginFriendlyName()
|
||||
{
|
||||
|
||||
return $this->friendly_name;
|
||||
return $this->plugin_friendly_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [file_name] column value.
|
||||
* Get the [plugin_file] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFileName()
|
||||
public function getPluginFile()
|
||||
{
|
||||
|
||||
return $this->file_name;
|
||||
return $this->plugin_file;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -255,6 +273,39 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
return $this->plugin_folder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [plugin_setup_page] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginSetupPage()
|
||||
{
|
||||
|
||||
return $this->plugin_setup_page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [plugin_company_logo] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginCompanyLogo()
|
||||
{
|
||||
|
||||
return $this->plugin_company_logo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [plugin_workspaces] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginWorkspaces()
|
||||
{
|
||||
|
||||
return $this->plugin_workspaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [plugin_version] column value.
|
||||
*
|
||||
@@ -487,12 +538,12 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
} // setPluginDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [class_name] column.
|
||||
* Set the value of [plugin_class_name] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setClassName($v)
|
||||
public function setPluginClassName($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
@@ -501,20 +552,20 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->class_name !== $v) {
|
||||
$this->class_name = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::CLASS_NAME;
|
||||
if ($this->plugin_class_name !== $v) {
|
||||
$this->plugin_class_name = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_CLASS_NAME;
|
||||
}
|
||||
|
||||
} // setClassName()
|
||||
} // setPluginClassName()
|
||||
|
||||
/**
|
||||
* Set the value of [friendly_name] column.
|
||||
* Set the value of [plugin_friendly_name] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setFriendlyName($v)
|
||||
public function setPluginFriendlyName($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
@@ -523,20 +574,20 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->friendly_name !== $v || $v === '') {
|
||||
$this->friendly_name = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::FRIENDLY_NAME;
|
||||
if ($this->plugin_friendly_name !== $v || $v === '') {
|
||||
$this->plugin_friendly_name = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME;
|
||||
}
|
||||
|
||||
} // setFriendlyName()
|
||||
} // setPluginFriendlyName()
|
||||
|
||||
/**
|
||||
* Set the value of [file_name] column.
|
||||
* Set the value of [plugin_file] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setFileName($v)
|
||||
public function setPluginFile($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
@@ -545,12 +596,12 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->file_name !== $v || $v === '') {
|
||||
$this->file_name = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::FILE_NAME;
|
||||
if ($this->plugin_file !== $v || $v === '') {
|
||||
$this->plugin_file = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_FILE;
|
||||
}
|
||||
|
||||
} // setFileName()
|
||||
} // setPluginFile()
|
||||
|
||||
/**
|
||||
* Set the value of [plugin_folder] column.
|
||||
@@ -574,6 +625,72 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
|
||||
} // setPluginFolder()
|
||||
|
||||
/**
|
||||
* Set the value of [plugin_setup_page] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setPluginSetupPage($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->plugin_setup_page !== $v || $v === '') {
|
||||
$this->plugin_setup_page = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_SETUP_PAGE;
|
||||
}
|
||||
|
||||
} // setPluginSetupPage()
|
||||
|
||||
/**
|
||||
* Set the value of [plugin_company_logo] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setPluginCompanyLogo($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->plugin_company_logo !== $v || $v === '') {
|
||||
$this->plugin_company_logo = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_COMPANY_LOGO;
|
||||
}
|
||||
|
||||
} // setPluginCompanyLogo()
|
||||
|
||||
/**
|
||||
* Set the value of [plugin_workspaces] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setPluginWorkspaces($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->plugin_workspaces !== $v || $v === '') {
|
||||
$this->plugin_workspaces = $v;
|
||||
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_WORKSPACES;
|
||||
}
|
||||
|
||||
} // setPluginWorkspaces()
|
||||
|
||||
/**
|
||||
* Set the value of [plugin_version] column.
|
||||
*
|
||||
@@ -873,46 +990,52 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
|
||||
$this->plugin_description = $rs->getString($startcol + 3);
|
||||
|
||||
$this->class_name = $rs->getString($startcol + 4);
|
||||
$this->plugin_class_name = $rs->getString($startcol + 4);
|
||||
|
||||
$this->friendly_name = $rs->getString($startcol + 5);
|
||||
$this->plugin_friendly_name = $rs->getString($startcol + 5);
|
||||
|
||||
$this->file_name = $rs->getString($startcol + 6);
|
||||
$this->plugin_file = $rs->getString($startcol + 6);
|
||||
|
||||
$this->plugin_folder = $rs->getString($startcol + 7);
|
||||
|
||||
$this->plugin_version = $rs->getString($startcol + 8);
|
||||
$this->plugin_setup_page = $rs->getString($startcol + 8);
|
||||
|
||||
$this->plugin_enable = $rs->getBoolean($startcol + 9);
|
||||
$this->plugin_company_logo = $rs->getString($startcol + 9);
|
||||
|
||||
$this->plugin_private = $rs->getBoolean($startcol + 10);
|
||||
$this->plugin_workspaces = $rs->getString($startcol + 10);
|
||||
|
||||
$this->plugin_menus = $rs->getString($startcol + 11);
|
||||
$this->plugin_version = $rs->getString($startcol + 11);
|
||||
|
||||
$this->plugin_folders = $rs->getString($startcol + 12);
|
||||
$this->plugin_enable = $rs->getBoolean($startcol + 12);
|
||||
|
||||
$this->plugin_triggers = $rs->getString($startcol + 13);
|
||||
$this->plugin_private = $rs->getBoolean($startcol + 13);
|
||||
|
||||
$this->plugin_pm_functions = $rs->getString($startcol + 14);
|
||||
$this->plugin_menus = $rs->getString($startcol + 14);
|
||||
|
||||
$this->plugin_redirect_login = $rs->getString($startcol + 15);
|
||||
$this->plugin_folders = $rs->getString($startcol + 15);
|
||||
|
||||
$this->plugin_steps = $rs->getString($startcol + 16);
|
||||
$this->plugin_triggers = $rs->getString($startcol + 16);
|
||||
|
||||
$this->plugin_css = $rs->getString($startcol + 17);
|
||||
$this->plugin_pm_functions = $rs->getString($startcol + 17);
|
||||
|
||||
$this->plugin_js = $rs->getString($startcol + 18);
|
||||
$this->plugin_redirect_login = $rs->getString($startcol + 18);
|
||||
|
||||
$this->plugin_rest_service = $rs->getString($startcol + 19);
|
||||
$this->plugin_steps = $rs->getString($startcol + 19);
|
||||
|
||||
$this->plugin_attributes = $rs->getString($startcol + 20);
|
||||
$this->plugin_css = $rs->getString($startcol + 20);
|
||||
|
||||
$this->plugin_js = $rs->getString($startcol + 21);
|
||||
|
||||
$this->plugin_rest_service = $rs->getString($startcol + 22);
|
||||
|
||||
$this->plugin_attributes = $rs->getString($startcol + 23);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 21; // 21 = PluginsRegistryPeer::NUM_COLUMNS - PluginsRegistryPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 24; // 24 = PluginsRegistryPeer::NUM_COLUMNS - PluginsRegistryPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating PluginsRegistry object", $e);
|
||||
@@ -1129,54 +1252,63 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
return $this->getPluginDescription();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getClassName();
|
||||
return $this->getPluginClassName();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getFriendlyName();
|
||||
return $this->getPluginFriendlyName();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getFileName();
|
||||
return $this->getPluginFile();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getPluginFolder();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getPluginVersion();
|
||||
return $this->getPluginSetupPage();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getPluginEnable();
|
||||
return $this->getPluginCompanyLogo();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getPluginPrivate();
|
||||
return $this->getPluginWorkspaces();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getPluginMenus();
|
||||
return $this->getPluginVersion();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getPluginFolders();
|
||||
return $this->getPluginEnable();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getPluginTriggers();
|
||||
return $this->getPluginPrivate();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getPluginPmFunctions();
|
||||
return $this->getPluginMenus();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getPluginRedirectLogin();
|
||||
return $this->getPluginFolders();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getPluginSteps();
|
||||
return $this->getPluginTriggers();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getPluginCss();
|
||||
return $this->getPluginPmFunctions();
|
||||
break;
|
||||
case 18:
|
||||
return $this->getPluginJs();
|
||||
return $this->getPluginRedirectLogin();
|
||||
break;
|
||||
case 19:
|
||||
return $this->getPluginRestService();
|
||||
return $this->getPluginSteps();
|
||||
break;
|
||||
case 20:
|
||||
return $this->getPluginCss();
|
||||
break;
|
||||
case 21:
|
||||
return $this->getPluginJs();
|
||||
break;
|
||||
case 22:
|
||||
return $this->getPluginRestService();
|
||||
break;
|
||||
case 23:
|
||||
return $this->getPluginAttributes();
|
||||
break;
|
||||
default:
|
||||
@@ -1203,23 +1335,26 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
$keys[1] => $this->getPrUid(),
|
||||
$keys[2] => $this->getPluginNamespace(),
|
||||
$keys[3] => $this->getPluginDescription(),
|
||||
$keys[4] => $this->getClassName(),
|
||||
$keys[5] => $this->getFriendlyName(),
|
||||
$keys[6] => $this->getFileName(),
|
||||
$keys[4] => $this->getPluginClassName(),
|
||||
$keys[5] => $this->getPluginFriendlyName(),
|
||||
$keys[6] => $this->getPluginFile(),
|
||||
$keys[7] => $this->getPluginFolder(),
|
||||
$keys[8] => $this->getPluginVersion(),
|
||||
$keys[9] => $this->getPluginEnable(),
|
||||
$keys[10] => $this->getPluginPrivate(),
|
||||
$keys[11] => $this->getPluginMenus(),
|
||||
$keys[12] => $this->getPluginFolders(),
|
||||
$keys[13] => $this->getPluginTriggers(),
|
||||
$keys[14] => $this->getPluginPmFunctions(),
|
||||
$keys[15] => $this->getPluginRedirectLogin(),
|
||||
$keys[16] => $this->getPluginSteps(),
|
||||
$keys[17] => $this->getPluginCss(),
|
||||
$keys[18] => $this->getPluginJs(),
|
||||
$keys[19] => $this->getPluginRestService(),
|
||||
$keys[20] => $this->getPluginAttributes(),
|
||||
$keys[8] => $this->getPluginSetupPage(),
|
||||
$keys[9] => $this->getPluginCompanyLogo(),
|
||||
$keys[10] => $this->getPluginWorkspaces(),
|
||||
$keys[11] => $this->getPluginVersion(),
|
||||
$keys[12] => $this->getPluginEnable(),
|
||||
$keys[13] => $this->getPluginPrivate(),
|
||||
$keys[14] => $this->getPluginMenus(),
|
||||
$keys[15] => $this->getPluginFolders(),
|
||||
$keys[16] => $this->getPluginTriggers(),
|
||||
$keys[17] => $this->getPluginPmFunctions(),
|
||||
$keys[18] => $this->getPluginRedirectLogin(),
|
||||
$keys[19] => $this->getPluginSteps(),
|
||||
$keys[20] => $this->getPluginCss(),
|
||||
$keys[21] => $this->getPluginJs(),
|
||||
$keys[22] => $this->getPluginRestService(),
|
||||
$keys[23] => $this->getPluginAttributes(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -1264,54 +1399,63 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
$this->setPluginDescription($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setClassName($value);
|
||||
$this->setPluginClassName($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setFriendlyName($value);
|
||||
$this->setPluginFriendlyName($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setFileName($value);
|
||||
$this->setPluginFile($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setPluginFolder($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setPluginVersion($value);
|
||||
$this->setPluginSetupPage($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setPluginEnable($value);
|
||||
$this->setPluginCompanyLogo($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setPluginPrivate($value);
|
||||
$this->setPluginWorkspaces($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setPluginMenus($value);
|
||||
$this->setPluginVersion($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setPluginFolders($value);
|
||||
$this->setPluginEnable($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setPluginTriggers($value);
|
||||
$this->setPluginPrivate($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setPluginPmFunctions($value);
|
||||
$this->setPluginMenus($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setPluginRedirectLogin($value);
|
||||
$this->setPluginFolders($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setPluginSteps($value);
|
||||
$this->setPluginTriggers($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setPluginCss($value);
|
||||
$this->setPluginPmFunctions($value);
|
||||
break;
|
||||
case 18:
|
||||
$this->setPluginJs($value);
|
||||
$this->setPluginRedirectLogin($value);
|
||||
break;
|
||||
case 19:
|
||||
$this->setPluginRestService($value);
|
||||
$this->setPluginSteps($value);
|
||||
break;
|
||||
case 20:
|
||||
$this->setPluginCss($value);
|
||||
break;
|
||||
case 21:
|
||||
$this->setPluginJs($value);
|
||||
break;
|
||||
case 22:
|
||||
$this->setPluginRestService($value);
|
||||
break;
|
||||
case 23:
|
||||
$this->setPluginAttributes($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1354,15 +1498,15 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[4], $arr)) {
|
||||
$this->setClassName($arr[$keys[4]]);
|
||||
$this->setPluginClassName($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[5], $arr)) {
|
||||
$this->setFriendlyName($arr[$keys[5]]);
|
||||
$this->setPluginFriendlyName($arr[$keys[5]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[6], $arr)) {
|
||||
$this->setFileName($arr[$keys[6]]);
|
||||
$this->setPluginFile($arr[$keys[6]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[7], $arr)) {
|
||||
@@ -1370,55 +1514,67 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[8], $arr)) {
|
||||
$this->setPluginVersion($arr[$keys[8]]);
|
||||
$this->setPluginSetupPage($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[9], $arr)) {
|
||||
$this->setPluginEnable($arr[$keys[9]]);
|
||||
$this->setPluginCompanyLogo($arr[$keys[9]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[10], $arr)) {
|
||||
$this->setPluginPrivate($arr[$keys[10]]);
|
||||
$this->setPluginWorkspaces($arr[$keys[10]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[11], $arr)) {
|
||||
$this->setPluginMenus($arr[$keys[11]]);
|
||||
$this->setPluginVersion($arr[$keys[11]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setPluginFolders($arr[$keys[12]]);
|
||||
$this->setPluginEnable($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[13], $arr)) {
|
||||
$this->setPluginTriggers($arr[$keys[13]]);
|
||||
$this->setPluginPrivate($arr[$keys[13]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[14], $arr)) {
|
||||
$this->setPluginPmFunctions($arr[$keys[14]]);
|
||||
$this->setPluginMenus($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[15], $arr)) {
|
||||
$this->setPluginRedirectLogin($arr[$keys[15]]);
|
||||
$this->setPluginFolders($arr[$keys[15]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[16], $arr)) {
|
||||
$this->setPluginSteps($arr[$keys[16]]);
|
||||
$this->setPluginTriggers($arr[$keys[16]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[17], $arr)) {
|
||||
$this->setPluginCss($arr[$keys[17]]);
|
||||
$this->setPluginPmFunctions($arr[$keys[17]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[18], $arr)) {
|
||||
$this->setPluginJs($arr[$keys[18]]);
|
||||
$this->setPluginRedirectLogin($arr[$keys[18]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[19], $arr)) {
|
||||
$this->setPluginRestService($arr[$keys[19]]);
|
||||
$this->setPluginSteps($arr[$keys[19]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[20], $arr)) {
|
||||
$this->setPluginAttributes($arr[$keys[20]]);
|
||||
$this->setPluginCss($arr[$keys[20]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[21], $arr)) {
|
||||
$this->setPluginJs($arr[$keys[21]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[22], $arr)) {
|
||||
$this->setPluginRestService($arr[$keys[22]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[23], $arr)) {
|
||||
$this->setPluginAttributes($arr[$keys[23]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1448,22 +1604,34 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_DESCRIPTION, $this->plugin_description);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::CLASS_NAME)) {
|
||||
$criteria->add(PluginsRegistryPeer::CLASS_NAME, $this->class_name);
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_CLASS_NAME)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_CLASS_NAME, $this->plugin_class_name);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::FRIENDLY_NAME)) {
|
||||
$criteria->add(PluginsRegistryPeer::FRIENDLY_NAME, $this->friendly_name);
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME, $this->plugin_friendly_name);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::FILE_NAME)) {
|
||||
$criteria->add(PluginsRegistryPeer::FILE_NAME, $this->file_name);
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_FILE)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_FILE, $this->plugin_file);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_FOLDER)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_FOLDER, $this->plugin_folder);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_SETUP_PAGE)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_SETUP_PAGE, $this->plugin_setup_page);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_COMPANY_LOGO)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_COMPANY_LOGO, $this->plugin_company_logo);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_WORKSPACES)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_WORKSPACES, $this->plugin_workspaces);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_VERSION)) {
|
||||
$criteria->add(PluginsRegistryPeer::PLUGIN_VERSION, $this->plugin_version);
|
||||
}
|
||||
@@ -1576,14 +1744,20 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setPluginDescription($this->plugin_description);
|
||||
|
||||
$copyObj->setClassName($this->class_name);
|
||||
$copyObj->setPluginClassName($this->plugin_class_name);
|
||||
|
||||
$copyObj->setFriendlyName($this->friendly_name);
|
||||
$copyObj->setPluginFriendlyName($this->plugin_friendly_name);
|
||||
|
||||
$copyObj->setFileName($this->file_name);
|
||||
$copyObj->setPluginFile($this->plugin_file);
|
||||
|
||||
$copyObj->setPluginFolder($this->plugin_folder);
|
||||
|
||||
$copyObj->setPluginSetupPage($this->plugin_setup_page);
|
||||
|
||||
$copyObj->setPluginCompanyLogo($this->plugin_company_logo);
|
||||
|
||||
$copyObj->setPluginWorkspaces($this->plugin_workspaces);
|
||||
|
||||
$copyObj->setPluginVersion($this->plugin_version);
|
||||
|
||||
$copyObj->setPluginEnable($this->plugin_enable);
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BasePluginsRegistryPeer
|
||||
const CLASS_DEFAULT = 'classes.model.PluginsRegistry';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 21;
|
||||
const NUM_COLUMNS = 24;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -43,18 +43,27 @@ abstract class BasePluginsRegistryPeer
|
||||
/** the column name for the PLUGIN_DESCRIPTION field */
|
||||
const PLUGIN_DESCRIPTION = 'PLUGINS_REGISTRY.PLUGIN_DESCRIPTION';
|
||||
|
||||
/** the column name for the CLASS_NAME field */
|
||||
const CLASS_NAME = 'PLUGINS_REGISTRY.CLASS_NAME';
|
||||
/** the column name for the PLUGIN_CLASS_NAME field */
|
||||
const PLUGIN_CLASS_NAME = 'PLUGINS_REGISTRY.PLUGIN_CLASS_NAME';
|
||||
|
||||
/** the column name for the FRIENDLY_NAME field */
|
||||
const FRIENDLY_NAME = 'PLUGINS_REGISTRY.FRIENDLY_NAME';
|
||||
/** the column name for the PLUGIN_FRIENDLY_NAME field */
|
||||
const PLUGIN_FRIENDLY_NAME = 'PLUGINS_REGISTRY.PLUGIN_FRIENDLY_NAME';
|
||||
|
||||
/** the column name for the FILE_NAME field */
|
||||
const FILE_NAME = 'PLUGINS_REGISTRY.FILE_NAME';
|
||||
/** the column name for the PLUGIN_FILE field */
|
||||
const PLUGIN_FILE = 'PLUGINS_REGISTRY.PLUGIN_FILE';
|
||||
|
||||
/** the column name for the PLUGIN_FOLDER field */
|
||||
const PLUGIN_FOLDER = 'PLUGINS_REGISTRY.PLUGIN_FOLDER';
|
||||
|
||||
/** the column name for the PLUGIN_SETUP_PAGE field */
|
||||
const PLUGIN_SETUP_PAGE = 'PLUGINS_REGISTRY.PLUGIN_SETUP_PAGE';
|
||||
|
||||
/** the column name for the PLUGIN_COMPANY_LOGO field */
|
||||
const PLUGIN_COMPANY_LOGO = 'PLUGINS_REGISTRY.PLUGIN_COMPANY_LOGO';
|
||||
|
||||
/** the column name for the PLUGIN_WORKSPACES field */
|
||||
const PLUGIN_WORKSPACES = 'PLUGINS_REGISTRY.PLUGIN_WORKSPACES';
|
||||
|
||||
/** the column name for the PLUGIN_VERSION field */
|
||||
const PLUGIN_VERSION = 'PLUGINS_REGISTRY.PLUGIN_VERSION';
|
||||
|
||||
@@ -105,10 +114,10 @@ abstract class BasePluginsRegistryPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('Id', 'PrUid', 'PluginNamespace', 'PluginDescription', 'ClassName', 'FriendlyName', 'FileName', 'PluginFolder', 'PluginVersion', 'PluginEnable', 'PluginPrivate', 'PluginMenus', 'PluginFolders', 'PluginTriggers', 'PluginPmFunctions', 'PluginRedirectLogin', 'PluginSteps', 'PluginCss', 'PluginJs', 'PluginRestService', 'PluginAttributes', ),
|
||||
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::ID, PluginsRegistryPeer::PR_UID, PluginsRegistryPeer::PLUGIN_NAMESPACE, PluginsRegistryPeer::PLUGIN_DESCRIPTION, PluginsRegistryPeer::CLASS_NAME, PluginsRegistryPeer::FRIENDLY_NAME, PluginsRegistryPeer::FILE_NAME, PluginsRegistryPeer::PLUGIN_FOLDER, PluginsRegistryPeer::PLUGIN_VERSION, PluginsRegistryPeer::PLUGIN_ENABLE, PluginsRegistryPeer::PLUGIN_PRIVATE, PluginsRegistryPeer::PLUGIN_MENUS, PluginsRegistryPeer::PLUGIN_FOLDERS, PluginsRegistryPeer::PLUGIN_TRIGGERS, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN, PluginsRegistryPeer::PLUGIN_STEPS, PluginsRegistryPeer::PLUGIN_CSS, PluginsRegistryPeer::PLUGIN_JS, PluginsRegistryPeer::PLUGIN_REST_SERVICE, PluginsRegistryPeer::PLUGIN_ATTRIBUTES, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ID', 'PR_UID', 'PLUGIN_NAMESPACE', 'PLUGIN_DESCRIPTION', 'CLASS_NAME', 'FRIENDLY_NAME', 'FILE_NAME', 'PLUGIN_FOLDER', 'PLUGIN_VERSION', 'PLUGIN_ENABLE', 'PLUGIN_PRIVATE', 'PLUGIN_MENUS', 'PLUGIN_FOLDERS', 'PLUGIN_TRIGGERS', 'PLUGIN_PM_FUNCTIONS', 'PLUGIN_REDIRECT_LOGIN', 'PLUGIN_STEPS', 'PLUGIN_CSS', 'PLUGIN_JS', 'PLUGIN_REST_SERVICE', 'PLUGIN_ATTRIBUTES', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
|
||||
BasePeer::TYPE_PHPNAME => array ('Id', 'PrUid', 'PluginNamespace', 'PluginDescription', 'PluginClassName', 'PluginFriendlyName', 'PluginFile', 'PluginFolder', 'PluginSetupPage', 'PluginCompanyLogo', 'PluginWorkspaces', 'PluginVersion', 'PluginEnable', 'PluginPrivate', 'PluginMenus', 'PluginFolders', 'PluginTriggers', 'PluginPmFunctions', 'PluginRedirectLogin', 'PluginSteps', 'PluginCss', 'PluginJs', 'PluginRestService', 'PluginAttributes', ),
|
||||
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::ID, PluginsRegistryPeer::PR_UID, PluginsRegistryPeer::PLUGIN_NAMESPACE, PluginsRegistryPeer::PLUGIN_DESCRIPTION, PluginsRegistryPeer::PLUGIN_CLASS_NAME, PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME, PluginsRegistryPeer::PLUGIN_FILE, PluginsRegistryPeer::PLUGIN_FOLDER, PluginsRegistryPeer::PLUGIN_SETUP_PAGE, PluginsRegistryPeer::PLUGIN_COMPANY_LOGO, PluginsRegistryPeer::PLUGIN_WORKSPACES, PluginsRegistryPeer::PLUGIN_VERSION, PluginsRegistryPeer::PLUGIN_ENABLE, PluginsRegistryPeer::PLUGIN_PRIVATE, PluginsRegistryPeer::PLUGIN_MENUS, PluginsRegistryPeer::PLUGIN_FOLDERS, PluginsRegistryPeer::PLUGIN_TRIGGERS, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN, PluginsRegistryPeer::PLUGIN_STEPS, PluginsRegistryPeer::PLUGIN_CSS, PluginsRegistryPeer::PLUGIN_JS, PluginsRegistryPeer::PLUGIN_REST_SERVICE, PluginsRegistryPeer::PLUGIN_ATTRIBUTES, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ID', 'PR_UID', 'PLUGIN_NAMESPACE', 'PLUGIN_DESCRIPTION', 'PLUGIN_CLASS_NAME', 'PLUGIN_FRIENDLY_NAME', 'PLUGIN_FILE', 'PLUGIN_FOLDER', 'PLUGIN_SETUP_PAGE', 'PLUGIN_COMPANY_LOGO', 'PLUGIN_WORKSPACES', 'PLUGIN_VERSION', 'PLUGIN_ENABLE', 'PLUGIN_PRIVATE', 'PLUGIN_MENUS', 'PLUGIN_FOLDERS', 'PLUGIN_TRIGGERS', 'PLUGIN_PM_FUNCTIONS', 'PLUGIN_REDIRECT_LOGIN', 'PLUGIN_STEPS', 'PLUGIN_CSS', 'PLUGIN_JS', 'PLUGIN_REST_SERVICE', 'PLUGIN_ATTRIBUTES', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -118,10 +127,10 @@ abstract class BasePluginsRegistryPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'PrUid' => 1, 'PluginNamespace' => 2, 'PluginDescription' => 3, 'ClassName' => 4, 'FriendlyName' => 5, 'FileName' => 6, 'PluginFolder' => 7, 'PluginVersion' => 8, 'PluginEnable' => 9, 'PluginPrivate' => 10, 'PluginMenus' => 11, 'PluginFolders' => 12, 'PluginTriggers' => 13, 'PluginPmFunctions' => 14, 'PluginRedirectLogin' => 15, 'PluginSteps' => 16, 'PluginCss' => 17, 'PluginJs' => 18, 'PluginRestService' => 19, 'PluginAttributes' => 20, ),
|
||||
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::ID => 0, PluginsRegistryPeer::PR_UID => 1, PluginsRegistryPeer::PLUGIN_NAMESPACE => 2, PluginsRegistryPeer::PLUGIN_DESCRIPTION => 3, PluginsRegistryPeer::CLASS_NAME => 4, PluginsRegistryPeer::FRIENDLY_NAME => 5, PluginsRegistryPeer::FILE_NAME => 6, PluginsRegistryPeer::PLUGIN_FOLDER => 7, PluginsRegistryPeer::PLUGIN_VERSION => 8, PluginsRegistryPeer::PLUGIN_ENABLE => 9, PluginsRegistryPeer::PLUGIN_PRIVATE => 10, PluginsRegistryPeer::PLUGIN_MENUS => 11, PluginsRegistryPeer::PLUGIN_FOLDERS => 12, PluginsRegistryPeer::PLUGIN_TRIGGERS => 13, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS => 14, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN => 15, PluginsRegistryPeer::PLUGIN_STEPS => 16, PluginsRegistryPeer::PLUGIN_CSS => 17, PluginsRegistryPeer::PLUGIN_JS => 18, PluginsRegistryPeer::PLUGIN_REST_SERVICE => 19, PluginsRegistryPeer::PLUGIN_ATTRIBUTES => 20, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'PR_UID' => 1, 'PLUGIN_NAMESPACE' => 2, 'PLUGIN_DESCRIPTION' => 3, 'CLASS_NAME' => 4, 'FRIENDLY_NAME' => 5, 'FILE_NAME' => 6, 'PLUGIN_FOLDER' => 7, 'PLUGIN_VERSION' => 8, 'PLUGIN_ENABLE' => 9, 'PLUGIN_PRIVATE' => 10, 'PLUGIN_MENUS' => 11, 'PLUGIN_FOLDERS' => 12, 'PLUGIN_TRIGGERS' => 13, 'PLUGIN_PM_FUNCTIONS' => 14, 'PLUGIN_REDIRECT_LOGIN' => 15, 'PLUGIN_STEPS' => 16, 'PLUGIN_CSS' => 17, 'PLUGIN_JS' => 18, 'PLUGIN_REST_SERVICE' => 19, 'PLUGIN_ATTRIBUTES' => 20, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
|
||||
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'PrUid' => 1, 'PluginNamespace' => 2, 'PluginDescription' => 3, 'PluginClassName' => 4, 'PluginFriendlyName' => 5, 'PluginFile' => 6, 'PluginFolder' => 7, 'PluginSetupPage' => 8, 'PluginCompanyLogo' => 9, 'PluginWorkspaces' => 10, 'PluginVersion' => 11, 'PluginEnable' => 12, 'PluginPrivate' => 13, 'PluginMenus' => 14, 'PluginFolders' => 15, 'PluginTriggers' => 16, 'PluginPmFunctions' => 17, 'PluginRedirectLogin' => 18, 'PluginSteps' => 19, 'PluginCss' => 20, 'PluginJs' => 21, 'PluginRestService' => 22, 'PluginAttributes' => 23, ),
|
||||
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::ID => 0, PluginsRegistryPeer::PR_UID => 1, PluginsRegistryPeer::PLUGIN_NAMESPACE => 2, PluginsRegistryPeer::PLUGIN_DESCRIPTION => 3, PluginsRegistryPeer::PLUGIN_CLASS_NAME => 4, PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME => 5, PluginsRegistryPeer::PLUGIN_FILE => 6, PluginsRegistryPeer::PLUGIN_FOLDER => 7, PluginsRegistryPeer::PLUGIN_SETUP_PAGE => 8, PluginsRegistryPeer::PLUGIN_COMPANY_LOGO => 9, PluginsRegistryPeer::PLUGIN_WORKSPACES => 10, PluginsRegistryPeer::PLUGIN_VERSION => 11, PluginsRegistryPeer::PLUGIN_ENABLE => 12, PluginsRegistryPeer::PLUGIN_PRIVATE => 13, PluginsRegistryPeer::PLUGIN_MENUS => 14, PluginsRegistryPeer::PLUGIN_FOLDERS => 15, PluginsRegistryPeer::PLUGIN_TRIGGERS => 16, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS => 17, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN => 18, PluginsRegistryPeer::PLUGIN_STEPS => 19, PluginsRegistryPeer::PLUGIN_CSS => 20, PluginsRegistryPeer::PLUGIN_JS => 21, PluginsRegistryPeer::PLUGIN_REST_SERVICE => 22, PluginsRegistryPeer::PLUGIN_ATTRIBUTES => 23, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'PR_UID' => 1, 'PLUGIN_NAMESPACE' => 2, 'PLUGIN_DESCRIPTION' => 3, 'PLUGIN_CLASS_NAME' => 4, 'PLUGIN_FRIENDLY_NAME' => 5, 'PLUGIN_FILE' => 6, 'PLUGIN_FOLDER' => 7, 'PLUGIN_SETUP_PAGE' => 8, 'PLUGIN_COMPANY_LOGO' => 9, 'PLUGIN_WORKSPACES' => 10, 'PLUGIN_VERSION' => 11, 'PLUGIN_ENABLE' => 12, 'PLUGIN_PRIVATE' => 13, 'PLUGIN_MENUS' => 14, 'PLUGIN_FOLDERS' => 15, 'PLUGIN_TRIGGERS' => 16, 'PLUGIN_PM_FUNCTIONS' => 17, 'PLUGIN_REDIRECT_LOGIN' => 18, 'PLUGIN_STEPS' => 19, 'PLUGIN_CSS' => 20, 'PLUGIN_JS' => 21, 'PLUGIN_REST_SERVICE' => 22, 'PLUGIN_ATTRIBUTES' => 23, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -230,14 +239,20 @@ abstract class BasePluginsRegistryPeer
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_DESCRIPTION);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::CLASS_NAME);
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_CLASS_NAME);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::FRIENDLY_NAME);
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::FILE_NAME);
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_FILE);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_FOLDER);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_SETUP_PAGE);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_COMPANY_LOGO);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_WORKSPACES);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_VERSION);
|
||||
|
||||
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_ENABLE);
|
||||
|
||||
@@ -5621,10 +5621,13 @@
|
||||
<column name="PR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="PLUGIN_NAMESPACE" type="VARCHAR" size="100" required="true"/>
|
||||
<column name="PLUGIN_DESCRIPTION" type="VARCHAR" size="200" default=""/>
|
||||
<column name="CLASS_NAME" type="VARCHAR" size="100" required="true"/>
|
||||
<column name="FRIENDLY_NAME" type="VARCHAR" size="150" default=""/>
|
||||
<column name="FILE_NAME" type="VARCHAR" size="250" required="true" default=""/>
|
||||
<column name="PLUGIN_CLASS_NAME" type="VARCHAR" size="100" required="true"/>
|
||||
<column name="PLUGIN_FRIENDLY_NAME" type="VARCHAR" size="150" default=""/>
|
||||
<column name="PLUGIN_FILE" type="VARCHAR" size="250" required="true" default=""/>
|
||||
<column name="PLUGIN_FOLDER" type="VARCHAR" size="100" required="true" default=""/>
|
||||
<column name="PLUGIN_SETUP_PAGE" type="VARCHAR" size="100" default=""/>
|
||||
<column name="PLUGIN_COMPANY_LOGO" type="VARCHAR" size="100" default=""/>
|
||||
<column name="PLUGIN_WORKSPACES" type="VARCHAR" size="100" default=""/>
|
||||
<column name="PLUGIN_VERSION" type="VARCHAR" size="50" default=""/>
|
||||
<column name="PLUGIN_ENABLE" type="BOOLEAN" default="false"/>
|
||||
<column name="PLUGIN_PRIVATE" type="BOOLEAN" default="false"/>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* adminProxy.php
|
||||
*
|
||||
@@ -1382,7 +1385,7 @@ class adminProxy extends HttpProxyController
|
||||
$params = array ();
|
||||
|
||||
$oServerConf = &serverConf::getSingleton();
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$licenseManager = &pmLicenseManager::getSingleton();
|
||||
|
||||
//License Information:
|
||||
@@ -1455,10 +1458,10 @@ class adminProxy extends HttpProxyController
|
||||
if (file_exists( PATH_PLUGINS . $sFileName . ".php" )) {
|
||||
$plugin = array();
|
||||
$addonDetails = $pluginRegistry->getPluginDetails( $sFileName . ".php" );
|
||||
$plugin['name'] = $addonDetails->sNamespace;
|
||||
$plugin['description'] = $addonDetails->sDescription;
|
||||
$plugin['version'] = $addonDetails->iVersion;
|
||||
$plugin['enable'] = $addonDetails->enabled;
|
||||
$plugin['name'] = $addonDetails->getNamespace();
|
||||
$plugin['description'] = $addonDetails->getDescription();
|
||||
$plugin['version'] = $addonDetails->getVersion();
|
||||
$plugin['enable'] = $addonDetails->isEnabled();
|
||||
$plugins[] = $plugin;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class caseSchedulerProxy extends HttpProxyController
|
||||
{
|
||||
|
||||
@@ -507,11 +509,11 @@ class caseSchedulerProxy extends HttpProxyController
|
||||
|
||||
if ((isset( $_POST['form']['CASE_SH_PLUGIN_UID'] )) && ($_POST['form']['CASE_SH_PLUGIN_UID'] != "")) {
|
||||
$params = explode( "--", $_REQUEST['form']['CASE_SH_PLUGIN_UID'] );
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||
|
||||
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail) {
|
||||
if (($caseSchedulerPluginDetail->sNamespace == $params[0]) && ($caseSchedulerPluginDetail->sActionId == $params[1])) {
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\CaseSchedulerPlugin $caseSchedulerPluginDetail */
|
||||
foreach ($activePluginsForCaseScheduler as $caseSchedulerPluginDetail) {
|
||||
if (($caseSchedulerPluginDetail->equalNamespaceTo($params[0])) && ($caseSchedulerPluginDetail->equalActionIdTo($params[1]))) {
|
||||
$caseSchedulerSelected = $caseSchedulerPluginDetail;
|
||||
}
|
||||
}
|
||||
@@ -519,7 +521,7 @@ class caseSchedulerProxy extends HttpProxyController
|
||||
//Save the form
|
||||
$oData = $_POST['pluginFields'];
|
||||
$oData['SCH_UID'] = $aData['SCH_UID'];
|
||||
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionSave, $oData );
|
||||
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->getNamespace(), $caseSchedulerPluginDetail->getActionSave(), $oData );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Designer Controller
|
||||
*
|
||||
@@ -134,10 +136,10 @@ class Designer extends Controller
|
||||
$sourceCss = array();
|
||||
$sourceJs = array();
|
||||
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$srcPath = $pluginRegistry->getDesignerSourcePath();
|
||||
|
||||
foreach ($srcPath as $key => $value) {
|
||||
foreach ($srcPath as $value) {
|
||||
$ext = pathinfo($value->pathFile, PATHINFO_EXTENSION);
|
||||
if ($ext === "css") {
|
||||
$sourceCss[] = $value->pathFile;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Main Controller for processMaker v2.1
|
||||
* @date Jul 17, 2011
|
||||
@@ -156,7 +158,7 @@ class Main extends Controller
|
||||
$this->memcache->delete( 'rbacSession' . session_id() );
|
||||
} else {
|
||||
// Execute SSO trigger
|
||||
$pluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
if (defined( 'PM_SINGLE_SIGN_ON' )) {
|
||||
if ($pluginRegistry->existsTrigger( PM_SINGLE_SIGN_ON )) {
|
||||
if ($pluginRegistry->executeTriggers( PM_SINGLE_SIGN_ON, null )) {
|
||||
@@ -473,7 +475,7 @@ class Main extends Controller
|
||||
}
|
||||
}
|
||||
if (class_exists( 'PMPluginRegistry' )) {
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$logoPlugin = $oPluginRegistry->getCompanyLogo( $sCompanyLogo );
|
||||
if ($logoPlugin != '/images/processmaker2.logo2.png') {
|
||||
$sCompanyLogo = $logoPlugin;
|
||||
|
||||
@@ -3146,10 +3146,13 @@ CREATE TABLE `PLUGINS_REGISTRY`
|
||||
`PR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PLUGIN_NAMESPACE` VARCHAR(100) NOT NULL,
|
||||
`PLUGIN_DESCRIPTION` VARCHAR(200) default '',
|
||||
`CLASS_NAME` VARCHAR(100) NOT NULL,
|
||||
`FRIENDLY_NAME` VARCHAR(150) default '',
|
||||
`FILE_NAME` VARCHAR(250) default '' NOT NULL,
|
||||
`PLUGIN_CLASS_NAME` VARCHAR(100) NOT NULL,
|
||||
`PLUGIN_FRIENDLY_NAME` VARCHAR(150) default '',
|
||||
`PLUGIN_FILE` VARCHAR(250) default '' NOT NULL,
|
||||
`PLUGIN_FOLDER` VARCHAR(100) default '' NOT NULL,
|
||||
`PLUGIN_SETUP_PAGE` VARCHAR(100) default '',
|
||||
`PLUGIN_COMPANY_LOGO` VARCHAR(100) default '',
|
||||
`PLUGIN_WORKSPACES` VARCHAR(100) default '',
|
||||
`PLUGIN_VERSION` VARCHAR(50) default '',
|
||||
`PLUGIN_ENABLE` INTEGER default 0,
|
||||
`PLUGIN_PRIVATE` INTEGER default 0,
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
global $G_TMP_MENU;
|
||||
global $RBAC;
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
@@ -288,7 +291,7 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton(); //lsl
|
||||
$pluginRegistry = PluginRegistry::loadSingleton(); //lsl
|
||||
$status = $pluginRegistry->getStatusPlugin('actionsByEmail');
|
||||
|
||||
if ((string)($status) !== 'enabled' &&
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
$_GET = $filter->xssFilterHard($_GET);
|
||||
@@ -1623,7 +1625,7 @@ function uploadExternalDocument()
|
||||
G::uploadFile($fileObj['tempName'], $sPathName, $sFileName); //upload
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger (PM_UPLOAD_DOCUMENT) && class_exists ('uploadDocumentData')) {
|
||||
$oData['APP_UID'] = $appId;
|
||||
$documentData = new uploadDocumentData (
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
try {
|
||||
$docUid = $_POST['form']['DOC_UID'];
|
||||
$appDocUid = $_POST['form']['APP_DOC_UID'];
|
||||
@@ -124,7 +127,7 @@ try {
|
||||
G::uploadFile($_FILES['form']['tmp_name']['APP_DOC_FILENAME'], $sPathName, $sFileName);
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists('uploadDocumentData')) {
|
||||
|
||||
$oData['APP_UID'] = $appId;
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
try {
|
||||
global $RBAC;
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
|
||||
@@ -153,7 +156,7 @@ try {
|
||||
}
|
||||
break;
|
||||
case 'authSourcesNew':
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
$arr = Array ();
|
||||
$oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP );
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
@@ -1022,7 +1024,7 @@ class Ajax
|
||||
}
|
||||
}
|
||||
|
||||
$pluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($pluginRegistry->existsTrigger(PM_GET_CASES_AJAX_LISTENER)) {
|
||||
$ajax = $pluginRegistry->executeTriggers(PM_GET_CASES_AJAX_LISTENER, null);
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
unset($_SESSION['APPLICATION']);
|
||||
|
||||
//get the action from GET or POST, default is todo
|
||||
@@ -194,12 +197,13 @@ $oHeadPublisher->assign('extJsViewState', $oHeadPublisher->getExtJsViewState());
|
||||
$oHeadPublisher->assign('isIE', Bootstrap::isIE());
|
||||
$oHeadPublisher->assign('__OPEN_APPLICATION_UID__', $openApplicationUid);
|
||||
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$fromPlugin = $oPluginRegistry->getOpenReassignCallback();
|
||||
$jsFunction = false;
|
||||
if(sizeof($fromPlugin)) {
|
||||
foreach($fromPlugin as $key => $jsFile) {
|
||||
$jsFile = $jsFile->callBackFile;
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\OpenReassignCallback $jsFile */
|
||||
foreach($fromPlugin as $jsFile) {
|
||||
$jsFile = $jsFile->getCallBackFile();
|
||||
if(is_file($jsFile)) {
|
||||
$jsFile = file_get_contents($jsFile);
|
||||
if(!empty($jsFile)) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||
@@ -306,7 +308,7 @@ function getSimpleDashboardData ()
|
||||
|
||||
function getRegisteredDashboards ()
|
||||
{
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$dashBoardPages = $oPluginRegistry->getDashboardPages();
|
||||
print_r( G::json_encode( $dashBoardPages ) );
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
*/
|
||||
//validate the data post
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
$dynaForm = DynaformPeer::retrieveByPK($_GET["UID"]);
|
||||
|
||||
$flagDynaFormNewVersion = !is_null($dynaForm) && $dynaForm->getDynVersion() == 2;
|
||||
@@ -180,7 +182,7 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
|
||||
G::uploadFile( $arrayFileTmpName[$i], $sPathName, $sFileName );
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( "uploadDocumentData" )) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||
@@ -188,7 +190,7 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
|
||||
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
|
||||
|
||||
if ($uploadReturn) {
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->getNamespace();
|
||||
|
||||
if (! isset( $aFields["APP_DOC_UID"] )) {
|
||||
$aFields["APP_DOC_UID"] = $sAppDocUid;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (! isset( $_REQUEST['action'] )) {
|
||||
$return['success'] = 'failure';
|
||||
$return['message'] = 'You may request an action';
|
||||
@@ -25,7 +27,7 @@ function searchSavedJob ($schUid)
|
||||
|
||||
function pluginsList ()
|
||||
{
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||
$selectedPlugin = "";
|
||||
if ((isset( $_REQUEST['plg_uid'] )) && ($_REQUEST['plg_uid'] != "")) {
|
||||
@@ -56,11 +58,12 @@ function pluginCaseSchedulerForm ()
|
||||
}
|
||||
$G_PUBLISH = new Publisher();
|
||||
$params = explode( "--", $_REQUEST['selectedOption'] );
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||
|
||||
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail) {
|
||||
if (($caseSchedulerPluginDetail->sNamespace == $params[0]) && ($caseSchedulerPluginDetail->sActionId == $params[1])) {
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\CaseSchedulerPlugin $caseSchedulerPluginDetail */
|
||||
foreach ($activePluginsForCaseScheduler as $caseSchedulerPluginDetail) {
|
||||
if (($caseSchedulerPluginDetail->equalNamespaceTo($params[0])) &&
|
||||
($caseSchedulerPluginDetail->equalActionIdTo($params[1]))) {
|
||||
$caseSchedulerSelected = $caseSchedulerPluginDetail;
|
||||
}
|
||||
}
|
||||
@@ -74,7 +77,7 @@ function pluginCaseSchedulerForm ()
|
||||
$oData = array ("PRO_UID" => $_REQUEST['pro_uid']
|
||||
);
|
||||
}
|
||||
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionForm, $oData );
|
||||
$oPluginRegistry->executeMethod($caseSchedulerPluginDetail->getNamespace(), $caseSchedulerPluginDetail->getActionForm(), $oData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
* @author David Callizaya <davidsantos@colosa.com>
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession" ) {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||
@@ -107,7 +109,7 @@ if (file_exists( $realPath )) {
|
||||
|
||||
if (!$sw_file_exists) {
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT )) {
|
||||
$error_message = G::LoadTranslation( 'ID_ERROR_FILE_NOT_EXIST', SYS_LANG, array('filename' => $info['basename'] . $ver . '.' . $ext) ) . ' ' . G::LoadTranslation('ID_CONTACT_ADMIN');
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
$filter = new InputFilter();
|
||||
|
||||
list($_GET['UID'], $_GET['TYPE'], $_GET['POSITION'], $_GET['ACTION']) = $filter->xssRegexFilter(
|
||||
@@ -382,7 +385,7 @@ try {
|
||||
$Fields['MESSAGE1'] = G::LoadTranslation( 'ID_PLEASE_ENTER_COMMENTS' );
|
||||
$Fields['MESSAGE2'] = G::LoadTranslation( 'ID_PLEASE_SELECT_FILE' );
|
||||
//START: If there is a Break Step registered from Plugin Similar as a Trigger debug
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT_BEFORE )) {
|
||||
//If a Plugin has registered a Break Page Evaluator
|
||||
$oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT_BEFORE, array ('USR_UID' => $_SESSION['USER_LOGGED']) );
|
||||
@@ -391,18 +394,6 @@ try {
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList', $oCase->getInputDocumentsCriteria( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['UID'] ), array_merge( array ('DOC_UID' => $_GET['UID']
|
||||
), $Fields ) ); //$aFields
|
||||
|
||||
|
||||
//call plugin
|
||||
//if ( $oPluginRegistry->existsTrigger ( PM_CASE_DOCUMENT_LIST ) ) {
|
||||
// $folderData = new folderData (null, null, $_SESSION['APPLICATION'], null, $_SESSION['USER_LOGGED'] );
|
||||
// $oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
// $oPluginRegistry->executeTriggers ( PM_CASE_DOCUMENT_LIST , $folderData );
|
||||
// //end plugin
|
||||
//}
|
||||
//else
|
||||
// $G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList', $oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['UID']), array_merge(array('DOC_UID'=>$_GET['UID']),$Fields));//$aFields
|
||||
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$titleDocument = "<h3>" . htmlspecialchars($Fields['INP_DOC_TITLE'], ENT_QUOTES) . "<br><small>" . G::LoadTranslation('ID_INPUT_DOCUMENT') . "</small></h3>";
|
||||
if ($Fields['INP_DOC_DESCRIPTION']) {
|
||||
@@ -454,7 +445,7 @@ try {
|
||||
switch ($_GET['ACTION']) {
|
||||
case 'GENERATE':
|
||||
//START: If there is a Break Step registered from Plugin Similar as a Trigger debug
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT_BEFORE )) {
|
||||
//If a Plugin has registered a Break Page Evaluator
|
||||
$oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT_BEFORE, array ('USR_UID' => $_SESSION['USER_LOGGED']) );
|
||||
@@ -646,7 +637,7 @@ try {
|
||||
//Save data - End
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||
|
||||
@@ -663,7 +654,7 @@ try {
|
||||
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
|
||||
if ($uploadReturn) {
|
||||
//Only delete if the file was saved correctly
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->sNamespace;
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->getNamespace();
|
||||
//$oAppDocument = new AppDocument();
|
||||
//$oAppDocument->update($aFields);
|
||||
unlink( $pathOutput . $sFilename . '.pdf' );
|
||||
@@ -718,7 +709,7 @@ try {
|
||||
$lastVersion = $oAppDocument->getLastAppDocVersion( $_GET['DOC'], $_SESSION['APPLICATION'] );
|
||||
$aFields = $oAppDocument->load( $_GET['DOC'], $lastVersion );
|
||||
$listing = false;
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST )) {
|
||||
$folderData = new folderData( null, null, $_SESSION['APPLICATION'], null, $_SESSION['USER_LOGGED'] );
|
||||
$folderData->PMType = "OUTPUT";
|
||||
@@ -1119,7 +1110,7 @@ try {
|
||||
if ($noShowTitle == 0) {
|
||||
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $array );
|
||||
}
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$externalSteps = $oPluginRegistry->getSteps();
|
||||
|
||||
$sNamespace = '';
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
try {
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
@@ -52,7 +54,7 @@ try {
|
||||
G::uploadFile( $_FILES['form']['tmp_name']['APP_DOC_FILENAME'], $sPathName, $sFileName );
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
||||
$oData['APP_UID'] = $_GET['APP_UID'];
|
||||
$documentData = new uploadDocumentData( $_GET['APP_UID'], $_SESSION['USER_LOGGED'], $sPathName . $sFileName, $aFields['APP_DOC_FILENAME'], $sAppDocUid );
|
||||
|
||||
@@ -22,11 +22,6 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
//call plugin
|
||||
// $oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
// $existsDynaforms = $oPluginRegistry->existsTrigger(PM_NEW_DYNAFORM_LIST );
|
||||
|
||||
|
||||
//for now, we are going with the default list, because the plugin is not complete
|
||||
include ('dynaforms_Edit.php');
|
||||
die();
|
||||
|
||||
@@ -80,11 +80,11 @@ try {
|
||||
BasePeer::doUpdate($oCriteriaSelect, $oCriteriaUpdate, $cnn);
|
||||
|
||||
//are all the plugins that are enabled in the workspace
|
||||
$pluginRegistry =& ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
foreach ($pluginRegistry->_aPluginDetails as $plugin) {
|
||||
$pluginRegistry = ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
foreach ($pluginRegistry->getPlugins() as $plugin) {
|
||||
if ($plugin->enabled && !in_array($plugin->sNamespace, $licenseManager->features)) {
|
||||
$pluginRegistry->disablePlugin($plugin->sNamespace);
|
||||
$pluginRegistry->pluginAdapter->savePlugin($plugin->sNamespace, $pluginRegistry);
|
||||
$pluginRegistry->savePlugin($plugin->sNamespace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (!defined("PATH_PM_ENTERPRISE")) {
|
||||
define("PATH_PM_ENTERPRISE", PATH_CORE . "enterprise/");
|
||||
}
|
||||
@@ -103,10 +105,10 @@ class enterprisePlugin extends PMPlugin
|
||||
|
||||
public function install()
|
||||
{
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails("enterprise.php");
|
||||
$pluginRegistry->enablePlugin($pluginDetail->sNamespace);
|
||||
$pluginRegistry->enablePlugin($pluginDetail->getNamespace());
|
||||
|
||||
file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance());
|
||||
}
|
||||
@@ -118,10 +120,10 @@ class enterprisePlugin extends PMPlugin
|
||||
public function setup()
|
||||
{
|
||||
if (!PluginsRegistryPeer::retrieveByPK(md5('enterprise'))) {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails("enterprise.php");
|
||||
$pluginRegistry->enablePlugin($pluginDetail->sNamespace);
|
||||
$pluginRegistry->pluginAdapter->savePlugin($pluginDetail->sNamespace, $pluginRegistry);
|
||||
$pluginRegistry->enablePlugin($pluginDetail->getNamespace());
|
||||
$pluginRegistry->savePlugin($pluginDetail->getNamespace());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,16 +178,17 @@ class enterprisePlugin extends PMPlugin
|
||||
if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php")) {
|
||||
require_once (PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php");
|
||||
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails($pluginName . ".php");
|
||||
|
||||
if ($pluginDetail) {
|
||||
$pluginRegistry->enablePlugin($pluginDetail->sNamespace);
|
||||
$pluginRegistry->disablePlugin($pluginDetail->sNamespace);
|
||||
$pluginRegistry->enablePlugin($pluginDetail->getNamespace());
|
||||
$pluginRegistry->disablePlugin($pluginDetail->getNamespace());
|
||||
|
||||
///////
|
||||
$plugin = new $pluginDetail->sClassName($pluginDetail->sNamespace, $pluginDetail->sFilename);
|
||||
$className = $pluginDetail->getClassName();
|
||||
$plugin = new $className($pluginDetail->getNamespace(), $pluginDetail->getFile());
|
||||
//$this->_aPlugins[$pluginDetail->sNamespace] = $plugin;
|
||||
|
||||
if (method_exists($plugin, "uninstall")) {
|
||||
@@ -193,7 +196,7 @@ class enterprisePlugin extends PMPlugin
|
||||
}
|
||||
|
||||
///////
|
||||
file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance());
|
||||
$pluginRegistry->savePlugin($pluginDetail->getNamespace());
|
||||
}
|
||||
|
||||
///////
|
||||
@@ -323,7 +326,7 @@ class enterprisePlugin extends PMPlugin
|
||||
}
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->registerPlugin('enterprise', __FILE__); //<- enterprise string must be in single quote, otherwise generate error
|
||||
|
||||
//since we are placing pmLicenseManager and EE together.. after register EE, we need to require_once the pmLicenseManager
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
global $RBAC;
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
$RBAC->requirePermissions("PM_SETUP_ADVANCE");
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
@@ -75,7 +77,7 @@ try {
|
||||
throw (new Exception($str));
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginFile = $sClassName . '.php';
|
||||
|
||||
if ($bMainFile && $bClassFile) {
|
||||
@@ -136,9 +138,9 @@ try {
|
||||
|
||||
$details = $oPluginRegistry->getPluginDetails($pluginFile);
|
||||
|
||||
$oPluginRegistry->installPlugin($details->sNamespace);
|
||||
$oPluginRegistry->installPlugin($details->getNamespace());
|
||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||
$size = file_put_contents(PATH_DATA_SITE . "plugin.singleton", $oPluginRegistry->serializeInstance());
|
||||
$oPluginRegistry->savePlugin($details->getNamespace());
|
||||
|
||||
//G::header("Location: pluginsList");
|
||||
//die;
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
$pluginFile = $_GET['id'];
|
||||
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
||||
$xmlform = isset($details->sPluginFolder) ? $details->sPluginFolder . '/' . $details->sSetupPage : '';
|
||||
$folder = $details->getFolder();
|
||||
$xmlform = (isset($folder)) ? $folder . '/' . $details->getSetupPage() : '';
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
@@ -23,7 +24,7 @@ try {
|
||||
throw ( new Exception ('setup .xml file is not defined for this plugin') );
|
||||
}
|
||||
|
||||
$Fields = $oPluginRegistry->getFieldsForPageSetup( $details->sNamespace );
|
||||
$Fields = $oPluginRegistry->getFieldsForPageSetup( $details->getNamespace() );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $xmlform, '',$Fields ,'pluginsSetupSave?id='.$pluginFile );
|
||||
} catch (Exception $e) {
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
|
||||
@@ -57,7 +57,7 @@ foreach ($availablePlugins as $filename) {
|
||||
}
|
||||
|
||||
//print "change to ENABLED";
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
$pluginFile = $sClassName . '.php';
|
||||
if (! file_exists( PATH_PLUGINS . $sClassName . '.php' )) {
|
||||
@@ -67,10 +67,10 @@ foreach ($availablePlugins as $filename) {
|
||||
require_once (PATH_PLUGINS . $pluginFile);
|
||||
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
||||
|
||||
$oPluginRegistry->installPlugin( $details->sNamespace );
|
||||
$oPluginRegistry->enablePlugin( $details->sNamespace );
|
||||
$oPluginRegistry->installPlugin($details->getNamespace());
|
||||
$oPluginRegistry->enablePlugin($details->getNamespace());
|
||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||
$size = file_put_contents( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance() );
|
||||
$oPluginRegistry->savePlugin($details->getNamespace());
|
||||
|
||||
$message .= "$filename - OK<br>";
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
try {
|
||||
$usr = '';
|
||||
$pwd = '';
|
||||
@@ -172,7 +174,7 @@ try {
|
||||
}
|
||||
|
||||
//Execute the SSO Script from plugin
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$lSession="";
|
||||
$loginInfo = new loginInfo ($usr, $pwd, $lSession );
|
||||
if ($oPluginRegistry->existsTrigger ( PM_LOGIN )) {
|
||||
@@ -425,7 +427,7 @@ try {
|
||||
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');
|
||||
}
|
||||
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger ( PM_AFTER_LOGIN )) {
|
||||
$oPluginRegistry->executeTriggers ( PM_AFTER_LOGIN , $_SESSION['USER_LOGGED'] );
|
||||
}
|
||||
|
||||
@@ -50,15 +50,19 @@ if (class_exists('redirectDetail')) {
|
||||
if (isset($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'])) {
|
||||
$userRole = $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'];
|
||||
}
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
//$oPluginRegistry->showArrays();
|
||||
$aRedirectLogin = $oPluginRegistry->getRedirectLogins();
|
||||
if (isset($aRedirectLogin)) {
|
||||
if (is_array($aRedirectLogin)) {
|
||||
foreach ($aRedirectLogin as $key => $detail) {
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\RedirectDetail $detail */
|
||||
foreach ($aRedirectLogin as $detail) {
|
||||
if (isset($detail->sPathMethod)) {
|
||||
if ($detail->sRoleCode == $userRole) {
|
||||
G::header('location: /sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $detail->sPathMethod );
|
||||
if ($detail->equalRoleCodeTo($userRole)) {
|
||||
G::header(
|
||||
'location: /sys' . SYS_TEMP . '/' . SYS_LANG .
|
||||
'/' . SYS_SKIN . '/' . $detail->getPathMethod()
|
||||
);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,11 +37,12 @@ if ($aux['extension'] != 'dat') {
|
||||
BasePeer::doUpdate($oCriteriaSelect, $oCriteriaUpdate, $cnn);
|
||||
|
||||
//are all the plugins that are enabled in the workspace
|
||||
$pluginRegistry =& ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
foreach ($pluginRegistry->_aPluginDetails as $plugin) {
|
||||
if ($plugin->enabled && !in_array($plugin->sNamespace, $licenseManager->features)) {
|
||||
$pluginRegistry->disablePlugin($plugin->sNamespace);
|
||||
$pluginRegistry->pluginAdapter->savePlugin($plugin->sNamespace, $pluginRegistry);
|
||||
$pluginRegistry = ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\PluginDetail $plugin */
|
||||
foreach ($pluginRegistry->getPlugins() as $plugin) {
|
||||
if ($plugin->isEnabled() && !in_array($plugin->getNamespace(), $licenseManager->features)) {
|
||||
$pluginRegistry->disablePlugin($plugin->getNamespace());
|
||||
$pluginRegistry->savePlugin($plugin->getNamespace());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ if (isset ($_SESSION['USER_LOGGED'])) {
|
||||
}
|
||||
} else {
|
||||
// Execute SSO trigger
|
||||
$pluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
if (defined('PM_SINGLE_SIGN_ON')) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
|
||||
@@ -47,9 +47,8 @@ $status = array(
|
||||
array("pending", G::LoadTranslation('ID_PENDING'))
|
||||
);
|
||||
|
||||
$pluginRegistry = PMPluginRegistry::getSingleton();
|
||||
$statusER = $pluginRegistry->getStatusPlugin('externalRegistration');
|
||||
$flagER = (preg_match('/^enabled$/', $statusER))? 1 : 0;
|
||||
$pluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$flagER = $pluginRegistry->isEnable('externalRegistration') ? 1 : 0;
|
||||
|
||||
$processes = getProcessArray($userUid);
|
||||
|
||||
|
||||
@@ -36,10 +36,8 @@ switch($req){
|
||||
|
||||
$arrayType = [];
|
||||
|
||||
$pluginRegistry = PMPluginRegistry::getSingleton();
|
||||
$statusEr = $pluginRegistry->getStatusPlugin('externalRegistration');
|
||||
|
||||
$flagEr = (preg_match('/^enabled$/', $statusEr))? 1 : 0;
|
||||
$pluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$flagEr = $pluginRegistry->isEnable('externalRegistration') ? 1 : 0;
|
||||
|
||||
if ($flagEr == 0) {
|
||||
$arrayType[] = 'EXTERNAL_REGISTRATION';
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
@@ -112,7 +115,7 @@ class Ajax
|
||||
$oData['PRO_TEMPLATE'] = (isset($_POST['PRO_TEMPLATE']) && $_POST['PRO_TEMPLATE'] != '') ? $_POST['form']['PRO_TEMPLATE'] : '';
|
||||
$oData['PROCESSMAP'] = $oProcessMap;
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->executeTriggers(PM_NEW_PROCESS_SAVE, $oData);
|
||||
} else {
|
||||
//$oProcessMap->updateProcess($_POST['form']);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
//$oHeadPublisher = & headPublisher::getSingleton();
|
||||
global $RBAC;
|
||||
@@ -47,12 +48,12 @@ if ($pmVersion != "") {
|
||||
$arrayFlagMenuNewOption = (version_compare($pmVersion . "", "3", ">="))? array("bpmn" => true) : array("pm" => true);
|
||||
}
|
||||
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
$arrayMenuNewOptionPlugin = array();
|
||||
$arrayContextMenuOptionPlugin = array();
|
||||
|
||||
foreach ($pluginRegistry->getDesignerMenu() as $value) {
|
||||
foreach ($oPluginRegistry->getDesignerMenu() as $value) {
|
||||
if (file_exists($value->file)) {
|
||||
require_once($value->file);
|
||||
|
||||
@@ -102,11 +103,11 @@ if($RBAC->userCanAccess('PM_DELETE_PROCESS_CASES') === 1) {
|
||||
}
|
||||
$oHeadPublisher->assign('deleteCasesFlag', $deleteCasesFlag);
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$callBackFile = $oPluginRegistry->getImportProcessCallback();
|
||||
$file = false;
|
||||
if(sizeof($callBackFile)) {
|
||||
$file = $callBackFile[0]->callBackFile != "" ? $callBackFile[0]->callBackFile : false;
|
||||
$file = $callBackFile[0]->getCallBackFile() != "" ? $callBackFile[0]->getCallBackFile() : false;
|
||||
}
|
||||
$oHeadPublisher->assign("importProcessCallbackFile", $file);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ if ($access != 1) {
|
||||
}
|
||||
|
||||
//call plugins
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->executeTriggers( PM_NEW_PROCESS_LIST, NULL );
|
||||
|
||||
$aFields['MESSAGE1'] = G::LoadTranslation( 'ID_MSG_ERROR_PRO_TITLE' );
|
||||
|
||||
@@ -68,7 +68,7 @@ switch ($function) {
|
||||
$oData['PRO_TEMPLATE'] = (isset( $_POST['form']['PRO_TEMPLATE'] ) && $_POST['form']['PRO_TEMPLATE'] != '') ? $_POST['form']['PRO_TEMPLATE'] : '';
|
||||
$oData['PROCESSMAP'] = $oProcessMap;
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$oPluginRegistry->executeTriggers( PM_NEW_PROCESS_SAVE, $oData );
|
||||
|
||||
G::header( 'location: processes_Map?PRO_UID=' . $sProUid );
|
||||
|
||||
@@ -74,7 +74,7 @@ $reports[] = array ('RPT_NUMBER' => count( $reports ),'RPT_UID' => 5,'RPT_TITLE'
|
||||
'RPT_TITLE' => "Report 9",//G::LoadTranslation('ID_REPORT6'),
|
||||
'VIEW' => G::LoadTranslation('ID_VIEW'));*/
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$aAvailableReports = $oPluginRegistry->getReports();
|
||||
|
||||
//$aReports = array();
|
||||
|
||||
@@ -210,7 +210,7 @@ try {
|
||||
break;
|
||||
default:
|
||||
$foundReport = false;
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$aAvailableReports = $oPluginRegistry->getReports();
|
||||
foreach ($aAvailableReports as $sReportClass) {
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ if (isset( $_FILES ) && $_FILES["ATTACH_FILE"]["error"] == 0) {
|
||||
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( "uploadDocumentData" )) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||
@@ -146,7 +146,7 @@ if (isset( $_FILES ) && $_FILES["ATTACH_FILE"]["error"] == 0) {
|
||||
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
|
||||
|
||||
if ($uploadReturn) {
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->getNamespace();
|
||||
|
||||
if (! isset( $aFields["APP_DOC_UID"] )) {
|
||||
$aFields["APP_DOC_UID"] = $sAppDocUid;
|
||||
|
||||
@@ -32,18 +32,17 @@ $filter = new InputFilter();
|
||||
$path = PATH_PLUGINS . $pluginFile;
|
||||
$path = $filter->validateInput($path, 'path');
|
||||
|
||||
$oPluginRegistry =& ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
$oPluginRegistry =& ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
if ($handle = opendir(PATH_PLUGINS)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if (strpos($file, '.php', 1) && $file == $pluginFile) {
|
||||
if ($pluginStatus == '1') {
|
||||
//print "change to disable";
|
||||
// change to disable
|
||||
$details = $oPluginRegistry->getPluginDetails($pluginFile);
|
||||
$oPluginRegistry->disablePlugin($details->sNamespace);
|
||||
$oPluginRegistry->pluginAdapter->savePlugin($details->sNamespace, $oPluginRegistry);
|
||||
G::auditLog("DisablePlugin", "Plugin Name: " . $details->sNamespace);
|
||||
//print "size saved : $size <br>";
|
||||
$oPluginRegistry->disablePlugin($details->getNamespace());
|
||||
//$oPluginRegistry->adapter->savePlugin($details->sNamespace, $oPluginRegistry);
|
||||
G::auditLog("DisablePlugin", "Plugin Name: " . $details->getNamespace());
|
||||
} else {
|
||||
$pluginName = str_replace(".php", "", $pluginFile);
|
||||
|
||||
@@ -73,14 +72,13 @@ if ($handle = opendir(PATH_PLUGINS)) {
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//print "change to ENABLED";
|
||||
// change to ENABLED
|
||||
require_once($path);
|
||||
$details = $oPluginRegistry->getPluginDetails($pluginFile);
|
||||
$oPluginRegistry->enablePlugin($details->sNamespace);
|
||||
$oPluginRegistry->enablePlugin($details->getNamespace());
|
||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||
$oPluginRegistry->pluginAdapter->savePlugin($details->sNamespace, $oPluginRegistry);
|
||||
G::auditLog("EnablePlugin", "Plugin Name: " . $details->sNamespace);
|
||||
//print "size saved : $size <br>";
|
||||
$oPluginRegistry->savePlugin($details->getNamespace());
|
||||
G::auditLog("EnablePlugin", "Plugin Name: " . $details->getNamespace());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ if ($access != 1) {
|
||||
}
|
||||
}
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
$G_SUB_MENU = 'setup';
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||
@@ -67,7 +68,7 @@ try {
|
||||
$tar->extractList( $listFiles, PATH_PLUGINS . 'data');
|
||||
$tar->extractList( $licenseName, PATH_PLUGINS);
|
||||
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$autoPlugins = glob(PATH_PLUGINS . "data/enterprise/data/*.tar");
|
||||
$autoPluginsA = array();
|
||||
|
||||
@@ -91,10 +92,9 @@ try {
|
||||
}
|
||||
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails($sClassName . ".php");
|
||||
$pluginRegistry->installPlugin($pluginDetail->sNamespace); //error
|
||||
$pluginRegistry->installPlugin($pluginDetail->getNamespace()); //error
|
||||
$pluginRegistry->savePlugin($pluginDetail->getNamespace());
|
||||
}
|
||||
|
||||
file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance());
|
||||
$licfile = glob(PATH_PLUGINS . "*.dat");
|
||||
|
||||
if ((isset($licfile[0])) && ( is_file($licfile[0]) )) {
|
||||
@@ -141,7 +141,7 @@ try {
|
||||
$tar->extractList( $listFiles, PATH_PLUGINS . 'data');
|
||||
$tar->extractList( $licenseName, PATH_PLUGINS);
|
||||
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$autoPlugins = glob(PATH_PLUGINS . "data/plugins/*.tar");
|
||||
$autoPluginsA = array();
|
||||
|
||||
@@ -165,11 +165,10 @@ try {
|
||||
}
|
||||
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails($sClassName . ".php");
|
||||
$pluginRegistry->installPlugin($pluginDetail->sNamespace); //error
|
||||
$pluginRegistry->installPlugin($pluginDetail->getNamespace()); //error
|
||||
$pluginRegistry->savePlugin($pluginDetail->getNamespace());
|
||||
}
|
||||
|
||||
file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance());
|
||||
|
||||
$licfile = glob(PATH_PLUGINS . "*.dat");
|
||||
|
||||
if ((isset($licfile[0])) && ( is_file($licfile[0]) )) {
|
||||
@@ -222,7 +221,7 @@ try {
|
||||
file_put_contents($pathFileFlag, 'New Enterprise');
|
||||
}
|
||||
|
||||
$oPluginRegistry =& ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginFile = $sClassName . '.php';
|
||||
|
||||
if ($bMainFile && $bClassFile) {
|
||||
@@ -326,13 +325,13 @@ try {
|
||||
|
||||
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
||||
|
||||
$oPluginRegistry->installPlugin( $details->sNamespace );
|
||||
$oPluginRegistry->installPlugin($details->getNamespace());
|
||||
|
||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||
$oPluginRegistry->pluginAdapter->savePlugin($details->sNamespace , $oPluginRegistry);
|
||||
$oPluginRegistry->savePlugin($details->getNamespace());
|
||||
|
||||
$response = $oPluginRegistry->verifyTranslation( $details->sNamespace);
|
||||
G::auditLog("InstallPlugin", "Plugin Name: ".$details->sNamespace );
|
||||
$response = $oPluginRegistry->verifyTranslation($details->getNamespace());
|
||||
G::auditLog("InstallPlugin", "Plugin Name: " . $details->getNamespace());
|
||||
|
||||
//if ($response->recordsCountSuccess <= 0) {
|
||||
//throw (new Exception( 'The plugin ' . $details->sNamespace . ' couldn\'t verify any translation item. Verified Records:' . $response->recordsCountSuccess));
|
||||
|
||||
@@ -42,7 +42,7 @@ $filter = new InputFilter();
|
||||
$pluginName = $_REQUEST['pluginUid'];
|
||||
$pluginName = $filter->xssFilterHard($pluginName);
|
||||
|
||||
$pluginRegistry =& ProcessMaker\Plugins\PluginsRegistry::loadSingleton();
|
||||
$pluginRegistry =& ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$pluginRegistry->uninstallPlugin($pluginName);
|
||||
|
||||
G::auditLog('RemovePlugin','Plugin Name: '.$pluginName);
|
||||
|
||||
@@ -24,10 +24,11 @@
|
||||
|
||||
$pluginFile = $_GET['id'];
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
||||
$xmlform = isset( $details->sPluginFolder ) ? $details->sPluginFolder . '/' . $details->sSetupPage : '';
|
||||
$folder = $details->getFolder();
|
||||
$xmlform = isset($folder) ? $folder . '/' . $details->getSetupPage() : '';
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
@@ -45,7 +46,7 @@ try {
|
||||
if (! file_exists( PATH_PLUGINS . $xmlform . '.xml' ))
|
||||
throw (new Exception( 'setup .xml file is not defined for this plugin' ));
|
||||
|
||||
$Fields = $oPluginRegistry->getFieldsForPageSetup( $details->sNamespace );
|
||||
$Fields = $oPluginRegistry->getFieldsForPageSetup( $details->getNamespace() );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $xmlform, '', $Fields, 'pluginsSetupSave?id=' . $pluginFile );
|
||||
} catch (Exception $e) {
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
$pluginFile = $_GET['id'];
|
||||
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
|
||||
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
||||
try {
|
||||
$Fields = $oPluginRegistry->updateFieldsForPageSetup( $details->sNamespace, $_POST );
|
||||
$Fields = $oPluginRegistry->updateFieldsForPageSetup( $details->getNamespace(), $_POST );
|
||||
$str = "$Fields fields saved successfully!";
|
||||
G::SendTemporalMessage( $str, 'info', 'string', 3, 100 );
|
||||
G::Header( "location: pluginsSetup?id=$pluginFile" );
|
||||
|
||||
@@ -1,462 +1,461 @@
|
||||
<?php
|
||||
/**
|
||||
* trackerAjax.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
try {
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
|
||||
if (isset( $_POST['form']['action'] )) {
|
||||
$_POST['action'] = $_POST['form']['action'];
|
||||
}
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'availableCaseTrackerObjects':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->availableCaseTrackerObjects( $_POST['PRO_UID'] );
|
||||
break;
|
||||
case 'assignCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Assign Case Tracker Object ('.$cto_UID.' - '.$_POST['OBJECT_TYPE'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
echo $cto_UID;
|
||||
break;
|
||||
case 'removeCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Remove Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'upCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Move Up Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'downCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Move Down Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'editStagesMap':
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Sm=new stagesmap();
|
||||
Sm.options = {
|
||||
target : "sm_target",
|
||||
dataServer: "../tracker/tracker_Ajax",
|
||||
uid : "' . $_POST['PRO_UID'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:"780",h:"540"},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : true,
|
||||
hideMenu : false
|
||||
};
|
||||
Sm.make();' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'showUploadedDocumentTracker':
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
require_once 'classes/model/InputDocument.php';
|
||||
require_once 'classes/model/Users.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||
|
||||
$oInputDocument = new InputDocument();
|
||||
if ($oAppDocument->Fields['DOC_UID'] != - 1) {
|
||||
$Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] );
|
||||
} else {
|
||||
$Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
|
||||
}
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX'] );
|
||||
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$oTask = new Task();
|
||||
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
|
||||
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
switch ($Fields['INP_DOC_FORM_NEEDED']) {
|
||||
case 'REAL':
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
|
||||
break;
|
||||
case 'VIRTUAL':
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
|
||||
break;
|
||||
case 'VREAL':
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
|
||||
break;
|
||||
default:
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
|
||||
break;
|
||||
}
|
||||
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
|
||||
|
||||
//If plugin and trigger are defined for listing
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
|
||||
//Now search for the file, if exists the change the download URL
|
||||
foreach ($filesPluginArray as $file) {
|
||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'showGeneratedDocumentTracker':
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$aFields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
$oOutputDocument = new OutputDocument();
|
||||
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $aFields['APP_UID'] );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX'] );
|
||||
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$oTask = new Task();
|
||||
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load( $aFields['USR_UID'] );
|
||||
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||
|
||||
//If plugin and trigger are defined for listing
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
|
||||
//Now search for the file, if exists the change the download URL
|
||||
foreach ($filesPluginArray as $file) {
|
||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'load':
|
||||
$oConnection = Propel::getConnection( 'workflow' );
|
||||
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
||||
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ( `STG_UID` )
|
||||
);" );
|
||||
$oStatement->executeQuery();
|
||||
/**
|
||||
* ************************************************************************************************************
|
||||
*/
|
||||
require_once 'classes/model/Stage.php';
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oProcess = new Process();
|
||||
$aRow = $oProcess->load( $oData->uid );
|
||||
$oSM = new stdclass();
|
||||
$oSM->title = new stdclass();
|
||||
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
|
||||
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
||||
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
||||
$oSM->title->position = new stdclass();
|
||||
$oSM->title->position->x = 10;
|
||||
$oSM->title->position->y = 10;
|
||||
$oSM->stages = array ();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( StagePeer::STG_UID );
|
||||
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
|
||||
$oCriteria->addSelectColumn( StagePeer::STG_POSX );
|
||||
$oCriteria->addSelectColumn( StagePeer::STG_POSY );
|
||||
$aConditions = array ();
|
||||
$aConditions[] = array (0 => StagePeer::STG_UID,1 => ContentPeer::CON_ID);
|
||||
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
|
||||
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
||||
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
||||
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||
$oCriteria->addAscendingOrderByColumn( StagePeer::STG_INDEX );
|
||||
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow1 = $oDataset->getRow()) {
|
||||
$oStage = new stdclass();
|
||||
$oStage->uid = $aRow1['STG_UID'];
|
||||
$oStage->label = strip_tags( $aRow1['CON_VALUE'] );
|
||||
$oStage->position = new stdclass();
|
||||
$oStage->position->x = (int) $aRow1['STG_POSX'];
|
||||
$oStage->position->y = (int) $aRow1['STG_POSY'];
|
||||
$oStage->derivation = new stdclass();
|
||||
$oStage->derivation->to = array ();
|
||||
if (! $oData->mode) {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( TaskPeer::STG_UID, $aRow1['STG_UID'] );
|
||||
$oDataset1 = TaskPeer::doSelectRS( $oCriteria );
|
||||
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset1->next();
|
||||
$aTasks = array ();
|
||||
while ($aRow2 = $oDataset1->getRow()) {
|
||||
$aTasks[] = $aRow2['TAS_UID'];
|
||||
$oDataset1->next();
|
||||
}
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||
$oStage->color = '#FF0000';
|
||||
} else {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED' );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||
$oStage->color = '#006633';
|
||||
} else {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) == 0) {
|
||||
$oStage->color = '#939598';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$oSM->stages[] = $oStage;
|
||||
$oDataset->next();
|
||||
}
|
||||
foreach ($oSM->stages as $iKey => $oStage) {
|
||||
if (isset( $oSM->stages[$iKey + 1] )) {
|
||||
$oDerivation = new stdclass();
|
||||
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
|
||||
$oSM->stages[$iKey]->derivation->to = array ($oDerivation);
|
||||
$oSM->stages[$iKey]->derivation->type = 0;
|
||||
}
|
||||
}
|
||||
//$oJSON = new Services_JSON();
|
||||
echo Bootstrap::json_encode( $oSM );
|
||||
break;
|
||||
case 'addStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( 'STG_UID' );
|
||||
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aStages = array ();
|
||||
$iStageNumber = 0;
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aStages[] = $aRow['STG_UID'];
|
||||
$iStageNumber ++;
|
||||
$oDataset->next();
|
||||
}
|
||||
if ($iStageNumber == 0) {
|
||||
$iStageNumber = 1;
|
||||
}
|
||||
$iIndex = $iStageNumber + 1;
|
||||
$bContinue = false;
|
||||
while (! $bContinue) {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( 'COUNT(*) AS TIMES' );
|
||||
$oCriteria->add( ContentPeer::CON_ID, $aStages, Criteria::IN );
|
||||
$oCriteria->add( ContentPeer::CON_CATEGORY, 'STG_TITLE' );
|
||||
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||
$oCriteria->add( ContentPeer::CON_VALUE, G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber );
|
||||
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
if ((int) $aRow['TIMES'] > 0) {
|
||||
$iStageNumber += 1;
|
||||
} else {
|
||||
$bContinue = true;
|
||||
}
|
||||
}
|
||||
$oStage = new Stage();
|
||||
$oNewStage = new stdclass();
|
||||
$oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber;
|
||||
|
||||
if ($oData->position->x < 0)
|
||||
$oData->position->x *= - 1;
|
||||
if ($oData->position->y < 0)
|
||||
$oData->position->y *= - 1;
|
||||
|
||||
$oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) );
|
||||
//$oJSON = new Services_JSON();
|
||||
echo Bootstrap::json_encode( $oNewStage );
|
||||
break;
|
||||
case 'saveStagePosition':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $oData->uid );
|
||||
$aFields['STG_UID'] = $oData->uid;
|
||||
$aFields['STG_POSX'] = $oData->position->x;
|
||||
$aFields['STG_POSY'] = $oData->position->y;
|
||||
$oStage->update( $aFields );
|
||||
break;
|
||||
case 'deleteStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $oData->stg_uid );
|
||||
$oStage->remove( $oData->stg_uid );
|
||||
$oStage->reorderPositions( $aFields['PRO_UID'], $aFields['STG_INDEX'] );
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria1 = new Criteria( 'workflow' );
|
||||
$oCriteria1->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||
$oCriteria2 = new Criteria( 'workflow' );
|
||||
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||
break;
|
||||
case 'editStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $oData->stg_uid );
|
||||
$aFields['THEINDEX'] = $oData->theindex;
|
||||
$aFields['action'] = 'updateStage';
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'updateStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $_POST['form']['STG_UID'] );
|
||||
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
|
||||
$oStage->update( $aFields );
|
||||
break;
|
||||
case 'tasksAssigned':
|
||||
require_once 'classes/model/Stage.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||
$oCriteria->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array ('PRO_UID' => $oData->pro_uid,'STG_UID' => $oData->stg_uid) );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'availableTasksForTheStage':
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||
$oCriteria->add( TaskPeer::PRO_UID, $_POST['PRO_UID'] );
|
||||
$oCriteria->add( TaskPeer::STG_UID, '' );
|
||||
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array ('STG_UID' => $_POST['STG_UID']) );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'assignTaskToStage':
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria1 = new Criteria( 'workflow' );
|
||||
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||
$oCriteria2 = new Criteria( 'workflow' );
|
||||
$oCriteria2->add( TaskPeer::STG_UID, $_POST['STG_UID'] );
|
||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||
break;
|
||||
case 'removeTaskFromTheStage':
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria1 = new Criteria( 'workflow' );
|
||||
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||
$oCriteria2 = new Criteria( 'workflow' );
|
||||
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||
break;
|
||||
|
||||
case "processMapLegend":
|
||||
$arrayField = array ();
|
||||
$arrayField["sLabel1"] = G::LoadTranslation( "ID_TASK_IN_PROGRESS" );
|
||||
$arrayField["sLabel2"] = G::LoadTranslation( "ID_COMPLETED_TASK" );
|
||||
$arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" );
|
||||
$arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" );
|
||||
$arrayField["tracker"] = 1;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField );
|
||||
G::RenderPage( "publish", "raw" );
|
||||
break;
|
||||
}
|
||||
} catch (Exception $oException) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($oException, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
die;
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* trackerAjax.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
try {
|
||||
$filter = new InputFilter();
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
|
||||
if (isset( $_POST['form']['action'] )) {
|
||||
$_POST['action'] = $_POST['form']['action'];
|
||||
}
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'availableCaseTrackerObjects':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->availableCaseTrackerObjects( $_POST['PRO_UID'] );
|
||||
break;
|
||||
case 'assignCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Assign Case Tracker Object ('.$cto_UID.' - '.$_POST['OBJECT_TYPE'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
echo $cto_UID;
|
||||
break;
|
||||
case 'removeCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Remove Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'upCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Move Up Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'downCaseTrackerObject':
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Move Down Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'editStagesMap':
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Sm=new stagesmap();
|
||||
Sm.options = {
|
||||
target : "sm_target",
|
||||
dataServer: "../tracker/tracker_Ajax",
|
||||
uid : "' . $_POST['PRO_UID'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:"780",h:"540"},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : true,
|
||||
hideMenu : false
|
||||
};
|
||||
Sm.make();' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'showUploadedDocumentTracker':
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
require_once 'classes/model/InputDocument.php';
|
||||
require_once 'classes/model/Users.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||
|
||||
$oInputDocument = new InputDocument();
|
||||
if ($oAppDocument->Fields['DOC_UID'] != - 1) {
|
||||
$Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] );
|
||||
} else {
|
||||
$Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
|
||||
}
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX'] );
|
||||
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$oTask = new Task();
|
||||
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
|
||||
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
switch ($Fields['INP_DOC_FORM_NEEDED']) {
|
||||
case 'REAL':
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
|
||||
break;
|
||||
case 'VIRTUAL':
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
|
||||
break;
|
||||
case 'VREAL':
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
|
||||
break;
|
||||
default:
|
||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
|
||||
break;
|
||||
}
|
||||
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
|
||||
|
||||
//If plugin and trigger are defined for listing
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
|
||||
//Now search for the file, if exists the change the download URL
|
||||
foreach ($filesPluginArray as $file) {
|
||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'showGeneratedDocumentTracker':
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$aFields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
$oOutputDocument = new OutputDocument();
|
||||
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $aFields['APP_UID'] );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX'] );
|
||||
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$oTask = new Task();
|
||||
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load( $aFields['USR_UID'] );
|
||||
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||
|
||||
//If plugin and trigger are defined for listing
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||
$oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton();
|
||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
|
||||
//Now search for the file, if exists the change the download URL
|
||||
foreach ($filesPluginArray as $file) {
|
||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'load':
|
||||
$oConnection = Propel::getConnection( 'workflow' );
|
||||
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
||||
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ( `STG_UID` )
|
||||
);" );
|
||||
$oStatement->executeQuery();
|
||||
/**
|
||||
* ************************************************************************************************************
|
||||
*/
|
||||
require_once 'classes/model/Stage.php';
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oProcess = new Process();
|
||||
$aRow = $oProcess->load( $oData->uid );
|
||||
$oSM = new stdclass();
|
||||
$oSM->title = new stdclass();
|
||||
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
|
||||
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
||||
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
||||
$oSM->title->position = new stdclass();
|
||||
$oSM->title->position->x = 10;
|
||||
$oSM->title->position->y = 10;
|
||||
$oSM->stages = array ();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( StagePeer::STG_UID );
|
||||
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
|
||||
$oCriteria->addSelectColumn( StagePeer::STG_POSX );
|
||||
$oCriteria->addSelectColumn( StagePeer::STG_POSY );
|
||||
$aConditions = array ();
|
||||
$aConditions[] = array (0 => StagePeer::STG_UID,1 => ContentPeer::CON_ID);
|
||||
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
|
||||
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
||||
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
||||
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||
$oCriteria->addAscendingOrderByColumn( StagePeer::STG_INDEX );
|
||||
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow1 = $oDataset->getRow()) {
|
||||
$oStage = new stdclass();
|
||||
$oStage->uid = $aRow1['STG_UID'];
|
||||
$oStage->label = strip_tags( $aRow1['CON_VALUE'] );
|
||||
$oStage->position = new stdclass();
|
||||
$oStage->position->x = (int) $aRow1['STG_POSX'];
|
||||
$oStage->position->y = (int) $aRow1['STG_POSY'];
|
||||
$oStage->derivation = new stdclass();
|
||||
$oStage->derivation->to = array ();
|
||||
if (! $oData->mode) {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( TaskPeer::STG_UID, $aRow1['STG_UID'] );
|
||||
$oDataset1 = TaskPeer::doSelectRS( $oCriteria );
|
||||
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset1->next();
|
||||
$aTasks = array ();
|
||||
while ($aRow2 = $oDataset1->getRow()) {
|
||||
$aTasks[] = $aRow2['TAS_UID'];
|
||||
$oDataset1->next();
|
||||
}
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||
$oStage->color = '#FF0000';
|
||||
} else {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED' );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||
$oStage->color = '#006633';
|
||||
} else {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) == 0) {
|
||||
$oStage->color = '#939598';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$oSM->stages[] = $oStage;
|
||||
$oDataset->next();
|
||||
}
|
||||
foreach ($oSM->stages as $iKey => $oStage) {
|
||||
if (isset( $oSM->stages[$iKey + 1] )) {
|
||||
$oDerivation = new stdclass();
|
||||
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
|
||||
$oSM->stages[$iKey]->derivation->to = array ($oDerivation);
|
||||
$oSM->stages[$iKey]->derivation->type = 0;
|
||||
}
|
||||
}
|
||||
//$oJSON = new Services_JSON();
|
||||
echo Bootstrap::json_encode( $oSM );
|
||||
break;
|
||||
case 'addStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( 'STG_UID' );
|
||||
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aStages = array ();
|
||||
$iStageNumber = 0;
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aStages[] = $aRow['STG_UID'];
|
||||
$iStageNumber ++;
|
||||
$oDataset->next();
|
||||
}
|
||||
if ($iStageNumber == 0) {
|
||||
$iStageNumber = 1;
|
||||
}
|
||||
$iIndex = $iStageNumber + 1;
|
||||
$bContinue = false;
|
||||
while (! $bContinue) {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( 'COUNT(*) AS TIMES' );
|
||||
$oCriteria->add( ContentPeer::CON_ID, $aStages, Criteria::IN );
|
||||
$oCriteria->add( ContentPeer::CON_CATEGORY, 'STG_TITLE' );
|
||||
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||
$oCriteria->add( ContentPeer::CON_VALUE, G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber );
|
||||
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
if ((int) $aRow['TIMES'] > 0) {
|
||||
$iStageNumber += 1;
|
||||
} else {
|
||||
$bContinue = true;
|
||||
}
|
||||
}
|
||||
$oStage = new Stage();
|
||||
$oNewStage = new stdclass();
|
||||
$oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber;
|
||||
|
||||
if ($oData->position->x < 0)
|
||||
$oData->position->x *= - 1;
|
||||
if ($oData->position->y < 0)
|
||||
$oData->position->y *= - 1;
|
||||
|
||||
$oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) );
|
||||
//$oJSON = new Services_JSON();
|
||||
echo Bootstrap::json_encode( $oNewStage );
|
||||
break;
|
||||
case 'saveStagePosition':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $oData->uid );
|
||||
$aFields['STG_UID'] = $oData->uid;
|
||||
$aFields['STG_POSX'] = $oData->position->x;
|
||||
$aFields['STG_POSY'] = $oData->position->y;
|
||||
$oStage->update( $aFields );
|
||||
break;
|
||||
case 'deleteStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $oData->stg_uid );
|
||||
$oStage->remove( $oData->stg_uid );
|
||||
$oStage->reorderPositions( $aFields['PRO_UID'], $aFields['STG_INDEX'] );
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria1 = new Criteria( 'workflow' );
|
||||
$oCriteria1->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||
$oCriteria2 = new Criteria( 'workflow' );
|
||||
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||
break;
|
||||
case 'editStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $oData->stg_uid );
|
||||
$aFields['THEINDEX'] = $oData->theindex;
|
||||
$aFields['action'] = 'updateStage';
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'updateStage':
|
||||
require_once 'classes/model/Stage.php';
|
||||
$oStage = new Stage();
|
||||
$aFields = $oStage->load( $_POST['form']['STG_UID'] );
|
||||
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
|
||||
$oStage->update( $aFields );
|
||||
break;
|
||||
case 'tasksAssigned':
|
||||
require_once 'classes/model/Stage.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
//$oJSON = new Services_JSON();
|
||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||
$oCriteria->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array ('PRO_UID' => $oData->pro_uid,'STG_UID' => $oData->stg_uid) );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'availableTasksForTheStage':
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||
$oCriteria->add( TaskPeer::PRO_UID, $_POST['PRO_UID'] );
|
||||
$oCriteria->add( TaskPeer::STG_UID, '' );
|
||||
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array ('STG_UID' => $_POST['STG_UID']) );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
case 'assignTaskToStage':
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria1 = new Criteria( 'workflow' );
|
||||
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||
$oCriteria2 = new Criteria( 'workflow' );
|
||||
$oCriteria2->add( TaskPeer::STG_UID, $_POST['STG_UID'] );
|
||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||
break;
|
||||
case 'removeTaskFromTheStage':
|
||||
require_once 'classes/model/Task.php';
|
||||
$oCriteria1 = new Criteria( 'workflow' );
|
||||
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||
$oCriteria2 = new Criteria( 'workflow' );
|
||||
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||
break;
|
||||
|
||||
case "processMapLegend":
|
||||
$arrayField = array ();
|
||||
$arrayField["sLabel1"] = G::LoadTranslation( "ID_TASK_IN_PROGRESS" );
|
||||
$arrayField["sLabel2"] = G::LoadTranslation( "ID_COMPLETED_TASK" );
|
||||
$arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" );
|
||||
$arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" );
|
||||
$arrayField["tracker"] = 1;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField );
|
||||
G::RenderPage( "publish", "raw" );
|
||||
break;
|
||||
}
|
||||
} catch (Exception $oException) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($oException, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* @author Hugo Loza
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
define('SE_LAYOUT_NOT_FOUND', 6);
|
||||
|
||||
class SkinEngine
|
||||
@@ -450,7 +452,7 @@ class SkinEngine
|
||||
$smarty->assign('tpl_submenu', PATH_TEMPLATE . 'submenu.html');
|
||||
|
||||
if (class_exists('PMPluginRegistry')) {
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
|
||||
}
|
||||
else {
|
||||
@@ -534,7 +536,7 @@ class SkinEngine
|
||||
$smarty->assign('tpl_submenu', PATH_TEMPLATE . 'submenu.html' );
|
||||
|
||||
if (class_exists('PMPluginRegistry')) {
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo ( '/images/processmaker.logo.jpg' );
|
||||
}
|
||||
else
|
||||
@@ -791,7 +793,7 @@ class SkinEngine
|
||||
}
|
||||
}
|
||||
if (class_exists('PMPluginRegistry') && defined("SYS_SYS")) {
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ( isset($sFotoSelect) && $sFotoSelect!='' && !(strcmp($sWspaceSelect, SYS_SYS)) ){
|
||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
|
||||
$sCompanyLogo = "/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/setup/showLogoFile.php?id=".base64_encode($sCompanyLogo);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Description of ActionsByEmailService
|
||||
*
|
||||
@@ -688,7 +690,7 @@ class ActionsByEmail
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (defined('PM_SINGLE_SIGN_ON')) {
|
||||
$pluginRegistry = &\PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
if ($pluginRegistry->existsTrigger(PM_SINGLE_SIGN_ON)) {
|
||||
if ($pluginRegistry->executeTriggers(PM_SINGLE_SIGN_ON, null)) {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use \G;
|
||||
use ProcessMaker\Plugins\Interfaces\CaseSchedulerPlugin;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class CaseScheduler
|
||||
{
|
||||
@@ -1115,13 +1117,13 @@ class CaseScheduler
|
||||
|
||||
//Plugin
|
||||
if (isset($arrayData["CASE_SH_PLUGIN_UID"]) && $arrayData["CASE_SH_PLUGIN_UID"] != "") {
|
||||
$oPluginRegistry = &\PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||
|
||||
$params = explode("--", $arrayData["CASE_SH_PLUGIN_UID"]);
|
||||
|
||||
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail) {
|
||||
if ($caseSchedulerPluginDetail->sNamespace == $params[0] && $caseSchedulerPluginDetail->sActionId == $params[1]) {
|
||||
/** @var CaseSchedulerPlugin $caseSchedulerPluginDetail */
|
||||
foreach ($activePluginsForCaseScheduler as $caseSchedulerPluginDetail) {
|
||||
if ($caseSchedulerPluginDetail->equalNamespaceTo($params[0]) && $caseSchedulerPluginDetail->equalActionIdTo($params[1])) {
|
||||
$caseSchedulerSelected = $caseSchedulerPluginDetail;
|
||||
}
|
||||
}
|
||||
@@ -1129,7 +1131,7 @@ class CaseScheduler
|
||||
if (isset($caseSchedulerSelected) && is_object($caseSchedulerSelected)) {
|
||||
//Save the form
|
||||
$arrayDataPlugin["SCH_UID"] = $arrayCaseSchedulerData["SCH_UID"];
|
||||
$oPluginRegistry->executeMethod($caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionSave, $arrayDataPlugin);
|
||||
$oPluginRegistry->executeMethod($caseSchedulerPluginDetail->getNamespace(), $caseSchedulerPluginDetail->getActionSave(), $arrayDataPlugin);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use \G;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use \UsersPeer;
|
||||
use \CasesPeer;
|
||||
|
||||
@@ -1098,12 +1099,11 @@ class Cases
|
||||
$cases = new \cases();
|
||||
|
||||
$listing = false;
|
||||
$oPluginRegistry = & \PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {
|
||||
$folderData = new \folderData(null, null, $sApplicationUID, null, $sUserUID);
|
||||
$folderData->PMType = "INPUT";
|
||||
$folderData->returnList = true;
|
||||
//$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$listing = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
|
||||
}
|
||||
$aObjectPermissions = $cases->getAllObjects($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID);
|
||||
@@ -1396,12 +1396,11 @@ class Cases
|
||||
$cases = new \cases();
|
||||
|
||||
$listing = false;
|
||||
$oPluginRegistry = & \PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {
|
||||
$folderData = new \folderData(null, null, $sApplicationUID, null, $sUserUID);
|
||||
$folderData->PMType = "OUTPUT";
|
||||
$folderData->returnList = true;
|
||||
//$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$listing = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
|
||||
}
|
||||
$aObjectPermissions = $cases->getAllObjects($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel\Cases;
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class InputDocument
|
||||
{
|
||||
/**
|
||||
@@ -1006,7 +1008,7 @@ class InputDocument
|
||||
$caseInstance->updateCase($appUid, $aData);
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = &\PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists("uploadDocumentData")) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
|
||||
@@ -1014,7 +1016,7 @@ class InputDocument
|
||||
$uploadReturn = $oPluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData);
|
||||
|
||||
if ($uploadReturn) {
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->getNamespace();
|
||||
if (!isset($aFields["APP_DOC_UID"])) {
|
||||
$aFields["APP_DOC_UID"] = $sAppDocUid;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel\Cases;
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class OutputDocument
|
||||
{
|
||||
/**
|
||||
@@ -200,7 +202,6 @@ class OutputDocument
|
||||
public function getCasesOutputDocuments($applicationUid, $userUid)
|
||||
{
|
||||
try {
|
||||
|
||||
$oCase = new \Cases();
|
||||
$fields = $oCase->loadCase( $applicationUid );
|
||||
$sProcessUID = $fields['PRO_UID'];
|
||||
@@ -244,7 +245,6 @@ class OutputDocument
|
||||
try {
|
||||
$sApplicationUID = $applicationUid;
|
||||
$sUserUID = $userUid;
|
||||
|
||||
$oCase = new \Cases();
|
||||
$fields = $oCase->loadCase( $sApplicationUID );
|
||||
$sProcessUID = $fields['PRO_UID'];
|
||||
@@ -442,7 +442,6 @@ class OutputDocument
|
||||
$outputID = $outputDocumentUid;
|
||||
$g = new \G();
|
||||
$g->sessionVarSave();
|
||||
|
||||
$oCase = new \Cases();
|
||||
$oCase->thisIsTheCurrentUser( $sApplication, $index, $sUserLogged, '', 'casesListExtJs' );
|
||||
//require_once 'classes/model/OutputDocument.php';
|
||||
@@ -526,11 +525,10 @@ class OutputDocument
|
||||
$this->generate( $outputID, $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'], $aProperties , $applicationUid);
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
|
||||
$oPluginRegistry = & \PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->sNamespace;
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->getNamespace();
|
||||
$oAppDocument1 = new \AppDocument();
|
||||
$oAppDocument1->update( $aFields );
|
||||
$sPathName = PATH_DOCUMENT . \G::getPathFromUID($sApplication) . PATH_SEP;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class ExportObjects
|
||||
{
|
||||
/**
|
||||
@@ -78,7 +80,7 @@ class ExportObjects
|
||||
public function processMigrablePlugins()
|
||||
{
|
||||
$plugins = array();
|
||||
$registry = \PMPluginRegistry::getSingleton();
|
||||
$registry = PluginRegistry::loadSingleton();
|
||||
$data = $registry->getPluginsData();
|
||||
foreach ($data as $detail) {
|
||||
$detail = (array)$detail;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Class PluginMigratorAdapter
|
||||
* @package ProcessMaker\BusinessModel\Migrator
|
||||
@@ -15,7 +17,7 @@ class PluginMigratorAdapter implements Exportable, Importable
|
||||
*/
|
||||
public function __construct($pluginName)
|
||||
{
|
||||
$registry = \PMPluginRegistry::getSingleton();
|
||||
$registry = PluginRegistry::loadSingleton();
|
||||
$plugin = $registry->getPluginByCode($pluginName);
|
||||
require_once (
|
||||
PATH_PLUGINS.PATH_SEP.
|
||||
|
||||
@@ -794,16 +794,6 @@ class Process
|
||||
switch ($option) {
|
||||
case "CREATE":
|
||||
$processUid = $process->create($arrayProcessData, false);
|
||||
|
||||
//Call plugins
|
||||
//$arrayData = array(
|
||||
// "PRO_UID" => $processUid,
|
||||
// "PRO_TEMPLATE" => (isset($arrayProcessData["PRO_TEMPLATE"]) && $arrayProcessData["PRO_TEMPLATE"] != "")? $arrayProcessData["PRO_TEMPLATE"] : "",
|
||||
// "PROCESSMAP" => $this //?
|
||||
//);
|
||||
//
|
||||
//$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
//$oPluginRegistry->executeTriggers(PM_NEW_PROCESS_SAVE, $arrayData);
|
||||
break;
|
||||
case "UPDATE":
|
||||
$result = $process->update($arrayProcessData);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use ProcessMaker\Plugins\Interfaces\StepDetail;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class Step
|
||||
{
|
||||
private $formatFieldNameInUppercase = true;
|
||||
@@ -528,7 +531,7 @@ class Step
|
||||
|
||||
//Get data
|
||||
//Call plugin
|
||||
$pluginRegistry = &\PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$externalSteps = $pluginRegistry->getSteps();
|
||||
|
||||
$criteria = new \Criteria("workflow");
|
||||
@@ -579,9 +582,10 @@ class Step
|
||||
$titleObj = "unknown " . $row["STEP_UID"];
|
||||
|
||||
if (is_array($externalSteps) && count($externalSteps) > 0) {
|
||||
foreach ($externalSteps as $key => $value) {
|
||||
if ($value->sStepId == $row["STEP_UID_OBJ"]) {
|
||||
$titleObj = $value->sStepTitle;
|
||||
/** @var StepDetail $value */
|
||||
foreach ($externalSteps as $value) {
|
||||
if ($value->equalStepIdTo($row["STEP_UID_OBJ"])) {
|
||||
$titleObj = $value->getStepTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use \G;
|
||||
use ProcessMaker\Plugins\Interfaces\StepDetail;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use \ProcessMaker\Util;
|
||||
|
||||
class Task
|
||||
@@ -627,14 +629,15 @@ class Task
|
||||
}
|
||||
|
||||
//Call plugin
|
||||
$pluginRegistry = &\PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$externalSteps = $pluginRegistry->getSteps();
|
||||
|
||||
if (is_array($externalSteps) && count($externalSteps) > 0) {
|
||||
foreach ($externalSteps as $key => $value) {
|
||||
/** @var StepDetail $value */
|
||||
foreach ($externalSteps as $value) {
|
||||
$arraydbStep[] = array(
|
||||
$this->getFieldNameByFormatFieldName("OBJ_UID") => $value->sStepId,
|
||||
$this->getFieldNameByFormatFieldName("OBJ_TITLE") => $value->sStepTitle,
|
||||
$this->getFieldNameByFormatFieldName("OBJ_UID") => $value->getStepId(),
|
||||
$this->getFieldNameByFormatFieldName("OBJ_TITLE") => $value->getStepTitle(),
|
||||
$this->getFieldNameByFormatFieldName("OBJ_DESCRIPTION") => "",
|
||||
$this->getFieldNameByFormatFieldName("OBJ_TYPE") => "EXTERNAL"
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
use \G;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class User
|
||||
{
|
||||
@@ -872,7 +873,7 @@ class User
|
||||
require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "RbacUsers.php");
|
||||
$this->userObj = new \RbacUsers();
|
||||
if (class_exists('PMPluginRegistry')) {
|
||||
$pluginRegistry = & \PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($pluginRegistry->existsTrigger(PM_BEFORE_CREATE_USER)) {
|
||||
try {
|
||||
$pluginRegistry->executeTriggers(PM_BEFORE_CREATE_USER, null);
|
||||
|
||||
@@ -3,251 +3,236 @@
|
||||
namespace ProcessMaker\Plugins\Adapters;
|
||||
|
||||
use PMPluginRegistry;
|
||||
use ProcessMaker\Plugins\Interfaces\Plugins;
|
||||
use ProcessMaker\Plugins\PluginsRegistry;
|
||||
|
||||
/**
|
||||
* Adapts the plugin singleton file and converts it to table
|
||||
* Class PluginAdapter
|
||||
* @package ProcessMaker\Plugins\Adapters
|
||||
*/
|
||||
class PluginAdapter
|
||||
{
|
||||
protected $pluginRegistry;
|
||||
/**
|
||||
* @var array $aliasNameAttributes
|
||||
* This array is a map to change the old key to the new, corresponding of each class
|
||||
* @var array
|
||||
*/
|
||||
private $aliasNameAttributes = [
|
||||
'sNamespace' => 'PLUGIN_NAMESPACE',
|
||||
'sDescription' => 'PLUGIN_DESCRIPTION',
|
||||
'sClassName' => 'CLASS_NAME',
|
||||
'sFriendlyName' => 'FRIENDLY_NAME',
|
||||
'sFilename' => 'FILE_NAME',
|
||||
'sPluginFolder' => 'PLUGIN_FOLDER',
|
||||
'iVersion' => 'PLUGIN_VERSION',
|
||||
'enabled' => 'PLUGIN_ENABLE',
|
||||
'bPrivate' => 'PLUGIN_PRIVATE',
|
||||
'_aMenus' => 'PLUGIN_MENUS',
|
||||
'_aFolders' => 'PLUGIN_FOLDERS',
|
||||
'_aTriggers' => 'PLUGIN_TRIGGERS',
|
||||
'_aPmFunctions' => 'PLUGIN_PM_FUNCTIONS',
|
||||
'_aRedirectLogin' => 'PLUGIN_REDIRECT_LOGIN',
|
||||
'_aSteps' => 'PLUGIN_STEPS',
|
||||
'_aCSSStyleSheets' => 'PLUGIN_CSS',
|
||||
'_aJavascripts' => 'PLUGIN_JS',
|
||||
'_restServices' => 'PLUGIN_REST_SERVICE',
|
||||
private $keyNames = [
|
||||
'sNamespace' => 'Namespace',
|
||||
//MenuDetail
|
||||
'sMenuId' => 'MenuId',
|
||||
'sFilename' => 'Filename',
|
||||
//FolderDetail
|
||||
'sFolderId' => 'FolderId',
|
||||
'sFolderName' => 'FolderName',
|
||||
//TriggerDetail
|
||||
'sTriggerId' => 'TriggerId',
|
||||
'sTriggerName' => 'TriggerName',
|
||||
//RedirectDetail
|
||||
'sRoleCode' => 'RoleCode',
|
||||
'sPathMethod' => 'PathMethod',
|
||||
//StepDetail
|
||||
'sStepId' => 'StepId',
|
||||
'sStepName' => 'StepName',
|
||||
'sStepTitle' => 'StepTitle',
|
||||
'sSetupStepPage' => 'SetupStepPage',
|
||||
//CssFile->_aCSSStyleSheets
|
||||
'sCssFile' => 'CssFile',
|
||||
//ToolbarDetail->_aToolbarFiles
|
||||
'sToolbarId' => 'ToolbarId',
|
||||
//CaseSchedulerPlugin->_aCaseSchedulerPlugin
|
||||
'sActionId' => 'ActionId',
|
||||
'sActionForm' => 'ActionForm',
|
||||
'sActionSave' => 'ActionSave',
|
||||
'sActionExecute' => 'ActionExecute',
|
||||
'sActionGetFields' => 'ActionGetFields',
|
||||
//TaskExtendedProperty->_aTaskExtendedProperties
|
||||
//DashboardPage->_aDashboardPages
|
||||
'sPage' => 'Page',
|
||||
'sName' => 'Name',
|
||||
'sIcon' => 'Icon',
|
||||
//CronFile->_aCronFiles
|
||||
'namespace' => 'Namespace',
|
||||
'cronFile' => 'CronFile',
|
||||
//ImportCallBack->_aImportProcessCallbackFile
|
||||
//OpenReassignCallback->_aOpenReassignCallback
|
||||
'callBackFile' => 'CallBackFile',
|
||||
//JsFile->_aJavascripts
|
||||
'sCoreJsFile' => 'CoreJsFile',
|
||||
'pluginJsFile' => 'PluginJsFile',
|
||||
];
|
||||
|
||||
/**
|
||||
* @param PMPluginRegistry|PluginsRegistry $pluginsSingleton
|
||||
* Map the fields of the table with their type
|
||||
* @var array $attributes
|
||||
*/
|
||||
public function save($pluginsSingleton)
|
||||
{
|
||||
$this->pluginRegistry = \G::json_decode(\G::json_encode($pluginsSingleton->iterateVisible()));
|
||||
foreach ($this->pluginRegistry->_aPluginDetails as $nameSpace => $value) {
|
||||
$this->savePluginMigrate($nameSpace, $this->pluginRegistry);
|
||||
}
|
||||
}
|
||||
|
||||
public function savePluginMigrate($sNamespace, $pluginRegistry)
|
||||
{
|
||||
$structurePlugin = $this->getOldPluginStructure($sNamespace, $pluginRegistry);
|
||||
$plugin = $this->diffFieldTable($structurePlugin);
|
||||
if ($plugin['PLUGIN_NAMESPACE']) {
|
||||
$fieldPlugin = \PluginsRegistry::loadOrCreateIfNotExists(md5($plugin['PLUGIN_NAMESPACE']), $plugin);
|
||||
\PluginsRegistry::update($fieldPlugin);
|
||||
}
|
||||
}
|
||||
|
||||
public function savePlugin($sNamespace, $pluginRegistry)
|
||||
{
|
||||
$structurePlugin = $this->getPluginStructure($sNamespace, $pluginRegistry);
|
||||
$plugin = $this->diffFieldTable($structurePlugin);
|
||||
if ($plugin['PLUGIN_NAMESPACE']) {
|
||||
$fieldPlugin = \PluginsRegistry::loadOrCreateIfNotExists(md5($plugin['PLUGIN_NAMESPACE']), $plugin);
|
||||
\PluginsRegistry::update($fieldPlugin);
|
||||
}
|
||||
}
|
||||
private $attributes = [
|
||||
'sNamespace' => ['name' => 'PLUGIN_NAMESPACE', 'type' => 'string'],
|
||||
'sDescription' => ['name' => 'PLUGIN_DESCRIPTION', 'type' => 'string'],
|
||||
'sClassName' => ['name' => 'PLUGIN_CLASS_NAME', 'type' => 'string'],
|
||||
'sFriendlyName' => ['name' => 'PLUGIN_FRIENDLY_NAME', 'type' => 'string'],
|
||||
'sFilename' => ['name' => 'PLUGIN_FILE', 'type' => 'string'],
|
||||
'sPluginFolder' => ['name' => 'PLUGIN_FOLDER', 'type' => 'string'],
|
||||
'sSetupPage' => ['name' => 'PLUGIN_SETUP_PAGE', 'type' => 'string'],
|
||||
'aWorkspaces' => ['name' => 'PLUGIN_WORKSPACES', 'type' => 'array'],
|
||||
'sCompanyLogo' => ['name' => 'PLUGIN_COMPANY_LOGO', 'type' => 'string'],
|
||||
'iVersion' => ['name' => 'PLUGIN_VERSION', 'type' => 'int'],
|
||||
'enabled' => ['name' => 'PLUGIN_ENABLE', 'type' => 'bool'],
|
||||
'bPrivate' => ['name' => 'PLUGIN_PRIVATE', 'type' => 'bool'],
|
||||
'_aMenus' => ['name' => 'PLUGIN_MENUS', 'type' => 'array'],
|
||||
'_aFolders' => ['name' => 'PLUGIN_FOLDERS', 'type' => 'array'],
|
||||
'_aTriggers' => ['name' => 'PLUGIN_TRIGGERS', 'type' => 'array'],
|
||||
'_aPmFunctions' => ['name' => 'PLUGIN_PM_FUNCTIONS', 'type' => 'array'],
|
||||
'_aRedirectLogin' => ['name' => 'PLUGIN_REDIRECT_LOGIN', 'type' => 'array'],
|
||||
'_aSteps' => ['name' => 'PLUGIN_STEPS', 'type' => 'array'],
|
||||
'_aCSSStyleSheets' => ['name' => 'PLUGIN_CSS', 'type' => 'array'],
|
||||
'_aCss' => ['name' => 'PLUGIN_CSS', 'type' => 'array'],
|
||||
'_aJavascripts' => ['name' => 'PLUGIN_JS', 'type' => 'array'],
|
||||
'_aJs' => ['name' => 'PLUGIN_JS', 'type' => 'array'],
|
||||
'_restServices' => ['name' => 'PLUGIN_REST_SERVICE', 'type' => 'array'],
|
||||
];
|
||||
|
||||
/**
|
||||
* @param string $nameSpace
|
||||
* @param object $pluginsRegistry
|
||||
* Data of the plugin singleton in array structure
|
||||
* @var array $PMPluginRegistry
|
||||
*/
|
||||
private $PMPluginRegistry;
|
||||
|
||||
/**
|
||||
* Returns the structure of the table in attributes
|
||||
* @return array
|
||||
*/
|
||||
public function getOldPluginStructure($nameSpace, $pluginsRegistry)
|
||||
public function getAttributes()
|
||||
{
|
||||
$pluginRegistry = clone $pluginsRegistry;
|
||||
$structurePlugins = $pluginRegistry->_aPluginDetails->{$nameSpace};
|
||||
unset($pluginRegistry->_aPluginDetails);
|
||||
$aPlugins = isset($pluginRegistry->_aPlugins->{$nameSpace}) ? $pluginRegistry->_aPlugins->{$nameSpace} : [];
|
||||
$structurePlugins = array_merge((array)$structurePlugins, (array)$aPlugins);
|
||||
unset($pluginRegistry->_aPlugins);
|
||||
foreach ($pluginRegistry as $propertyName => $propertyValue) {
|
||||
foreach ($propertyValue as $key => $plugin) {
|
||||
if (is_object($plugin) &&
|
||||
(
|
||||
(property_exists($plugin, 'sNamespace') && $plugin->sNamespace == $nameSpace) ||
|
||||
(!is_int($key) && $key == $nameSpace)
|
||||
)
|
||||
) {
|
||||
$structurePlugins[$propertyName][] = $plugin;
|
||||
} elseif (is_object($plugin) &&
|
||||
property_exists($plugin, 'pluginName') &&
|
||||
$plugin->pluginName == $nameSpace
|
||||
) {
|
||||
$structurePlugins[$propertyName][] = $plugin;
|
||||
} elseif (is_string($plugin) && $plugin == $nameSpace) {
|
||||
$structurePlugins[$propertyName][] = $plugin;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $structurePlugins;
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $nameSpace
|
||||
* @param object $pluginsRegistry
|
||||
* @return array
|
||||
* Migrate the singleton plugin to tables
|
||||
* @param PMPluginRegistry $PMPluginsSingleton
|
||||
*/
|
||||
public function getPluginStructure($nameSpace, $pluginsRegistry)
|
||||
public function migrate($PMPluginsSingleton)
|
||||
{
|
||||
$pluginRegistry = clone $pluginsRegistry;
|
||||
$structurePlugins = $pluginRegistry->_aPluginDetails[$nameSpace];
|
||||
unset($pluginRegistry->_aPluginDetails);
|
||||
$aPlugins = isset($pluginRegistry->_aPlugins[$nameSpace]) ? $pluginRegistry->_aPlugins[$nameSpace] : [];
|
||||
$structurePlugins = array_merge((array)$structurePlugins, get_object_vars($aPlugins));
|
||||
unset($pluginRegistry->_aPlugins);
|
||||
foreach ($pluginRegistry as $propertyName => $propertyValue) {
|
||||
foreach ($propertyValue as $key => $plugin) {
|
||||
if (is_object($plugin) &&
|
||||
(
|
||||
(property_exists($plugin, 'sNamespace') && $plugin->sNamespace == $nameSpace) ||
|
||||
(!is_int($key) && $key == $nameSpace)
|
||||
)
|
||||
) {
|
||||
$structurePlugins[$propertyName][] = $plugin;
|
||||
} elseif (is_object($plugin) &&
|
||||
property_exists($plugin, 'pluginName') &&
|
||||
$plugin->pluginName == $nameSpace
|
||||
) {
|
||||
$structurePlugins[$propertyName][] = $plugin;
|
||||
} elseif (is_array($plugin) && $key == $nameSpace) {
|
||||
$structurePlugins[$propertyName][$key] = $plugin;
|
||||
} elseif (is_bool($plugin) && $key == $nameSpace) {
|
||||
$structurePlugins[$propertyName][$key] = $plugin;
|
||||
} elseif (is_string($plugin) && $plugin == $nameSpace) {
|
||||
$structurePlugins[$propertyName][] = $plugin;
|
||||
}
|
||||
}
|
||||
$this->PMPluginRegistry = \G::json_decode(\G::json_encode($PMPluginsSingleton->getAttributes()), true);
|
||||
$this->parserNameKey();
|
||||
foreach ($this->PMPluginRegistry['_aPluginDetails'] as $nameSpace => $value) {
|
||||
$this->saveInTable($nameSpace, $this->PMPluginRegistry);
|
||||
}
|
||||
return $structurePlugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $plugin
|
||||
* @return array
|
||||
*/
|
||||
public function diffFieldTable($plugin)
|
||||
{
|
||||
$fields = [];
|
||||
$map = \PluginsRegistryPeer::getTableMap();
|
||||
$columns = $map->getColumns();
|
||||
$attributes = array_diff_key((array)$plugin, $this->aliasNameAttributes);
|
||||
$fieldsTMP = array_intersect_key((array)$plugin, $this->aliasNameAttributes);
|
||||
foreach ($this->aliasNameAttributes as $name => $nameTable) {
|
||||
if (array_key_exists($name, $fieldsTMP)) {
|
||||
switch (gettype($fieldsTMP[$name])) {
|
||||
case 'string':
|
||||
$valueField = array_key_exists($name, $fieldsTMP) ? $fieldsTMP[$name] : '';
|
||||
break;
|
||||
case 'array':
|
||||
$valueField = array_key_exists($name, $fieldsTMP) ? $fieldsTMP[$name] : [];
|
||||
$valueField = \G::json_encode($valueField);
|
||||
break;
|
||||
case 'integer':
|
||||
$valueField = array_key_exists($name, $fieldsTMP) ? $fieldsTMP[$name] : 0;
|
||||
break;
|
||||
case 'boolean':
|
||||
$valueField = array_key_exists($name, $fieldsTMP) ? ($fieldsTMP[$name] ? true : false ): false;
|
||||
break;
|
||||
case 'NULL':
|
||||
default:
|
||||
$valueField = array_key_exists($name, $fieldsTMP) ?
|
||||
$fieldsTMP[$name] :
|
||||
$this->getDefaultValueType($columns[$nameTable]->getType());
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$valueField = $this->getDefaultValueType($columns[$nameTable]->getType());
|
||||
}
|
||||
$fields[$nameTable] = $valueField;
|
||||
}
|
||||
$fields['PLUGIN_ATTRIBUTES'] = \G::json_encode($attributes);
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function getDefaultValueType($var)
|
||||
{
|
||||
switch ($var) {
|
||||
case 'string':
|
||||
$response = '';
|
||||
break;
|
||||
case 'int':
|
||||
$response = 0;
|
||||
break;
|
||||
case 'boolean':
|
||||
$response = false;
|
||||
break;
|
||||
default:
|
||||
$response = '';
|
||||
break;
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PluginsRegistry $oPlugins
|
||||
* Change to new key property $keyNames
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPluginsDefinition($oPlugins)
|
||||
private function parserNameKey()
|
||||
{
|
||||
$oldStructure = $this->convertArrayStructure();
|
||||
$oPlugins->setPlugins($oldStructure);
|
||||
$oPlugins = $this->populateAttributes($oPlugins, $oldStructure);
|
||||
return $oPlugins;
|
||||
}
|
||||
|
||||
public function convertArrayStructure()
|
||||
{
|
||||
$invertAlias = array_flip($this->aliasNameAttributes);
|
||||
$plugins = \PluginsRegistry::loadPlugins();
|
||||
$pluginsRegistry = [];
|
||||
foreach ($plugins as $index => $plugin) {
|
||||
$namePlugin = $plugin['PLUGIN_NAMESPACE'];
|
||||
$pluginsRegistry[$namePlugin] = new \stdClass();
|
||||
array_walk($plugin, function ($value, $key) use ($invertAlias, &$pluginsRegistry, $namePlugin) {
|
||||
if (array_key_exists($key, $invertAlias)) {
|
||||
$pluginsRegistry[$namePlugin]->{$invertAlias[$key]} = !is_null($data = \G::json_decode($value)) ?
|
||||
$data :
|
||||
(!empty($value) ? $value : []);
|
||||
}
|
||||
});
|
||||
$moreAttributes = \G::json_decode($plugin['PLUGIN_ATTRIBUTES']);
|
||||
$pluginsRegistry[$namePlugin] = Plugins::setter(array_merge(
|
||||
(array)$pluginsRegistry[$namePlugin],
|
||||
$moreAttributes ? (array)$moreAttributes : []
|
||||
));
|
||||
}
|
||||
return $pluginsRegistry;
|
||||
}
|
||||
|
||||
public function populateAttributes($oPlugins, $structures)
|
||||
{
|
||||
foreach ($structures as $namePlugin => $plugin) {
|
||||
foreach ($plugin as $nameAttribute => $detail) {
|
||||
if ($detail &&
|
||||
property_exists($oPlugins, $nameAttribute) &&
|
||||
$plugin->_aPluginDetails[$namePlugin]->enabled
|
||||
) {
|
||||
$oPlugins->{$nameAttribute} = array_merge($oPlugins->{$nameAttribute}, (array)$detail);
|
||||
$aPluginDetails = $this->PMPluginRegistry['_aPluginDetails'];
|
||||
unset($this->PMPluginRegistry['_aPluginDetails']);
|
||||
$aPlugins = $this->PMPluginRegistry['_aPlugins'];
|
||||
unset($this->PMPluginRegistry['_aPlugins']);
|
||||
foreach ($this->PMPluginRegistry as $propertyKey => $propertyValue) {
|
||||
foreach ($propertyValue as $attKey => $attributes) {
|
||||
if (is_array($attributes)) {
|
||||
foreach ($attributes as $index => $attribute) {
|
||||
if (array_key_exists($index, $this->keyNames)) {
|
||||
$newKey = $this->keyNames[$index];
|
||||
$value = $this->PMPluginRegistry[$propertyKey][$attKey][$index];
|
||||
$this->PMPluginRegistry[$propertyKey][$attKey][$newKey] = $value;
|
||||
unset($this->PMPluginRegistry[$propertyKey][$attKey][$index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $oPlugins;
|
||||
$this->PMPluginRegistry['_aPluginDetails'] = $aPluginDetails;
|
||||
$this->PMPluginRegistry['_aPlugins'] = $aPlugins;
|
||||
return $this->PMPluginRegistry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save plugin in table PLUGINS_REGISTRY
|
||||
* @param string $Namespace Name of plugin
|
||||
* @param array $PMPluginRegistry
|
||||
*/
|
||||
public function saveInTable($Namespace, $PMPluginRegistry)
|
||||
{
|
||||
$newStructurePlugin = $this->getAllAttributes($Namespace, $PMPluginRegistry);
|
||||
$plugin = $this->convertFieldTable($newStructurePlugin);
|
||||
if ($plugin['PLUGIN_NAMESPACE'] && $plugin['PLUGIN_CLASS_NAME'] && $plugin['PLUGIN_FILE']) {
|
||||
$fieldPlugin = \PluginsRegistry::loadOrCreateIfNotExists(md5($plugin['PLUGIN_NAMESPACE']), $plugin);
|
||||
\PluginsRegistry::update($fieldPlugin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts all attributes corresponding to a plugin
|
||||
* @param string $Namespace Name Plugin
|
||||
* @param array $PMPluginRegistry
|
||||
* @return array
|
||||
*/
|
||||
private function getAllAttributes($Namespace, $PMPluginRegistry)
|
||||
{
|
||||
$PluginDetails = $PMPluginRegistry['_aPluginDetails'][$Namespace];
|
||||
unset($PMPluginRegistry['_aPluginDetails']);
|
||||
$Plugin = isset($PMPluginRegistry['_aPlugins'][$Namespace]) ? $PMPluginRegistry['_aPlugins'][$Namespace] : [];
|
||||
unset($PMPluginRegistry['_aPlugins']);
|
||||
$newStructurePlugin = array_merge($PluginDetails, $Plugin);
|
||||
foreach ($PMPluginRegistry as $propertyName => $propertyValue) {
|
||||
foreach ($propertyValue as $key => $plugin) {
|
||||
if (is_array($plugin) &&
|
||||
((array_key_exists('Namespace', $plugin) && $plugin['Namespace'] == $Namespace) ||
|
||||
(!is_int($key) && $key == $Namespace))
|
||||
) {
|
||||
$newStructurePlugin[$propertyName][] = $plugin;
|
||||
} elseif (is_array($plugin) &&
|
||||
array_key_exists('pluginName', $plugin) &&
|
||||
$plugin['pluginName'] == $Namespace
|
||||
) {
|
||||
$newStructurePlugin[$propertyName][] = $plugin;
|
||||
} elseif (is_string($plugin) && $plugin == $Namespace) {
|
||||
$newStructurePlugin[$propertyName][] = $plugin;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $newStructurePlugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert de attributes to field of table PLUGINS_REGISTRY
|
||||
* @param array $plugin
|
||||
* @return array
|
||||
*/
|
||||
private function convertFieldTable($plugin)
|
||||
{
|
||||
$fields = [];
|
||||
$extraAttributes = array_diff_key($plugin, $this->attributes);
|
||||
$fieldsInTable = array_intersect_key($plugin, $this->attributes);
|
||||
foreach ($this->attributes as $name => $property) {
|
||||
switch ($property['type']) {
|
||||
case 'string':
|
||||
$valueField = array_key_exists($name, $fieldsInTable) ? $fieldsInTable[$name] : '';
|
||||
break;
|
||||
case 'array':
|
||||
$valueField = (array_key_exists($name, $fieldsInTable) && $fieldsInTable[$name]) ?
|
||||
$fieldsInTable[$name] :
|
||||
[];
|
||||
$valueField = \G::json_encode($valueField);
|
||||
break;
|
||||
case 'int':
|
||||
$valueField = array_key_exists($name, $fieldsInTable) ? $fieldsInTable[$name] : 0;
|
||||
break;
|
||||
case 'bool':
|
||||
$valueField = array_key_exists($name, $fieldsInTable) ?
|
||||
($fieldsInTable[$name] ? true : false) :
|
||||
false;
|
||||
break;
|
||||
default:
|
||||
$valueField = array_key_exists($name, $fieldsInTable) ?
|
||||
$fieldsInTable[$name] :
|
||||
[];
|
||||
break;
|
||||
}
|
||||
$fields[$property['name']] = $valueField;
|
||||
}
|
||||
$fields['PLUGIN_ATTRIBUTES'] = \G::json_encode($extraAttributes);
|
||||
return $fields;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,24 +2,43 @@
|
||||
|
||||
namespace ProcessMaker\Plugins\Interfaces;
|
||||
|
||||
use ProcessMaker\Plugins\Traits\Attributes;
|
||||
|
||||
/**
|
||||
* Class PluginDetail
|
||||
* @package ProcessMaker\Plugins\Interfaces
|
||||
*/
|
||||
class PluginDetail
|
||||
{
|
||||
public $sNamespace;
|
||||
public $sClassName;
|
||||
public $sFriendlyName = null;
|
||||
public $sDescription = null;
|
||||
public $sSetupPage = null;
|
||||
public $sFilename;
|
||||
public $sPluginFolder = '';
|
||||
public $sCompanyLogo = '';
|
||||
public $iVersion = 0;
|
||||
public $enabled = false;
|
||||
public $aWorkspaces = null;
|
||||
public $bPrivate = false;
|
||||
use Attributes;
|
||||
|
||||
/** @var string */
|
||||
private $sNamespace;
|
||||
/** @var string */
|
||||
private $sDescription = '';
|
||||
/** @var string */
|
||||
private $sClassName;
|
||||
/** @var string */
|
||||
private $sFriendlyName = '';
|
||||
/** @var string */
|
||||
private $sFilename;
|
||||
/** @var string */
|
||||
private $sPluginFolder = '';
|
||||
/** @var string */
|
||||
private $sSetupPage = '';
|
||||
/** @var string */
|
||||
private $sCompanyLogo = '';
|
||||
/** @var array */
|
||||
private $aWorkspaces = [];
|
||||
/** @var bool */
|
||||
private $enabled = false;
|
||||
/** @var bool */
|
||||
private $bPrivate = false;
|
||||
/** @var int */
|
||||
private $iVersion = 0;
|
||||
|
||||
/**
|
||||
* This function is the constructor of the pluginDetail class
|
||||
*
|
||||
* @param string $sNamespace
|
||||
* @param string $sClassName
|
||||
* @param string $sFilename
|
||||
@@ -27,6 +46,10 @@ class PluginDetail
|
||||
* @param string $sPluginFolder
|
||||
* @param string $sDescription
|
||||
* @param string $sSetupPage
|
||||
* @param string $sCompanyLogo
|
||||
* @param array $aWorkspaces
|
||||
* @param bool $enable
|
||||
* @param bool $bPrivate
|
||||
* @param integer $iVersion
|
||||
*/
|
||||
public function __construct(
|
||||
@@ -37,19 +60,242 @@ class PluginDetail
|
||||
$sPluginFolder = '',
|
||||
$sDescription = '',
|
||||
$sSetupPage = '',
|
||||
$iVersion = 0
|
||||
$iVersion = 0,
|
||||
$sCompanyLogo = '',
|
||||
$aWorkspaces = [],
|
||||
$enable = false,
|
||||
$bPrivate = false
|
||||
) {
|
||||
$this->sNamespace = $sNamespace;
|
||||
$this->sDescription = $sDescription;
|
||||
$this->sClassName = $sClassName;
|
||||
$this->sFriendlyName = $sFriendlyName;
|
||||
$this->sDescription = $sDescription;
|
||||
$this->sSetupPage = $sSetupPage;
|
||||
$this->iVersion = $iVersion;
|
||||
$this->sFilename = $sFilename;
|
||||
if ($sPluginFolder == '') {
|
||||
$this->sPluginFolder = $sNamespace;
|
||||
} else {
|
||||
$this->sPluginFolder = $sNamespace;
|
||||
if ($sPluginFolder) {
|
||||
$this->sPluginFolder = $sPluginFolder;
|
||||
}
|
||||
$this->sSetupPage = $sSetupPage;
|
||||
$this->sCompanyLogo = $sCompanyLogo;
|
||||
$this->aWorkspaces = $aWorkspaces;
|
||||
$this->enabled = $enable;
|
||||
$this->bPrivate = $bPrivate;
|
||||
$this->iVersion = $iVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name of plugin
|
||||
* @return string
|
||||
*/
|
||||
public function getNamespace()
|
||||
{
|
||||
return $this->sNamespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name of plugin
|
||||
* @param string $PluginNamespace
|
||||
*/
|
||||
public function setNamespace($PluginNamespace)
|
||||
{
|
||||
$this->sNamespace = $PluginNamespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get description
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->sDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
* @param string $PluginDescription
|
||||
*/
|
||||
public function setDescription($PluginDescription)
|
||||
{
|
||||
$this->sDescription = $PluginDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get class name
|
||||
* @return string
|
||||
*/
|
||||
public function getClassName()
|
||||
{
|
||||
return $this->sClassName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set class name
|
||||
* @param string $PluginClassName
|
||||
*/
|
||||
public function setClassName($PluginClassName)
|
||||
{
|
||||
$this->sClassName = $PluginClassName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get friendly name
|
||||
* @return string
|
||||
*/
|
||||
public function getFriendlyName()
|
||||
{
|
||||
return $this->sFriendlyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set friendly name
|
||||
* @param string $PluginFriendlyName
|
||||
*/
|
||||
public function setFriendlyName($PluginFriendlyName)
|
||||
{
|
||||
$this->sFriendlyName = $PluginFriendlyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path file
|
||||
* @return string
|
||||
*/
|
||||
public function getFile()
|
||||
{
|
||||
return $this->sFilename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set path file
|
||||
* @param string $PluginFile
|
||||
*/
|
||||
public function setFile($PluginFile)
|
||||
{
|
||||
$this->sFilename = $PluginFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name folder
|
||||
* @return string
|
||||
*/
|
||||
public function getFolder()
|
||||
{
|
||||
return $this->sPluginFolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name folder
|
||||
* @param string $PluginFolder
|
||||
*/
|
||||
public function setFolder($PluginFolder)
|
||||
{
|
||||
$this->sPluginFolder = $PluginFolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get setup page
|
||||
* @return string
|
||||
*/
|
||||
public function getSetupPage()
|
||||
{
|
||||
return $this->sSetupPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set setup page
|
||||
* @param string $PluginSetupPage
|
||||
*/
|
||||
public function setSetupPage($PluginSetupPage)
|
||||
{
|
||||
$this->sSetupPage = $PluginSetupPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get company logo
|
||||
* @return string
|
||||
*/
|
||||
public function getCompanyLogo()
|
||||
{
|
||||
return $this->sCompanyLogo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set company logo
|
||||
* @param string $PluginCompanyLogo
|
||||
*/
|
||||
public function setCompanyLogo($PluginCompanyLogo)
|
||||
{
|
||||
$this->sCompanyLogo = $PluginCompanyLogo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get workspace allowed
|
||||
* @return array
|
||||
*/
|
||||
public function getWorkspaces()
|
||||
{
|
||||
return $this->aWorkspaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set workspace allowed
|
||||
* @param array $PluginWorkspaces
|
||||
*/
|
||||
public function setWorkspaces($PluginWorkspaces)
|
||||
{
|
||||
$this->aWorkspaces = $PluginWorkspaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plugin is enable
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status plugin
|
||||
* @param bool $PluginEnable
|
||||
*/
|
||||
public function setEnabled($PluginEnable)
|
||||
{
|
||||
$this->enabled = $PluginEnable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get if plugin is private
|
||||
* @return bool
|
||||
*/
|
||||
public function isPrivate()
|
||||
{
|
||||
return $this->bPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status private
|
||||
* @param bool $PluginPrivate
|
||||
*/
|
||||
public function setPrivate($PluginPrivate)
|
||||
{
|
||||
$this->bPrivate = $PluginPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version of plugin
|
||||
* @return int
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return $this->iVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set version of plugin
|
||||
* @param int $PluginVersion
|
||||
*/
|
||||
public function setVersion($PluginVersion)
|
||||
{
|
||||
$this->iVersion = $PluginVersion;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user