Adding a flag to distinguish between files and templates in the getFilesManager class
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: gustav
|
||||
* Date: 3/18/16
|
||||
* Time: 10:30 AM
|
||||
*/
|
||||
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
/**
|
||||
* The assignment rules migrator class.
|
||||
* The container class that stores the import and export rules for assignment rules.
|
||||
*
|
||||
* Class AssignmentRulesMigrator
|
||||
* @package ProcessMaker\BusinessModel\Migrator
|
||||
*/
|
||||
|
||||
class AssignmentRulesMigrator implements Importable
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
// Declare the interface 'iTemplate'
|
||||
// Declare the interface 'Exportable'
|
||||
interface Exportable
|
||||
{
|
||||
public function beforeExport();
|
||||
|
||||
@@ -48,7 +48,12 @@ class GranularExporter
|
||||
$version = \ProcessMaker\Util\Common::getLastVersion($outputDir . $getProjectName . "-*.pmx") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
|
||||
$data = array();
|
||||
$data = array(
|
||||
'bpmn-definition' => [],
|
||||
'workflow-definition' => [],
|
||||
'workflow-files' => []
|
||||
);
|
||||
|
||||
$data["filename"] = $outputFilename;
|
||||
$data["version"] = "3.1";
|
||||
$data["container"] = "ProcessMaker-Project";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
// Declare the interface 'iTemplate'
|
||||
// Declare the interface 'Importable'
|
||||
interface Importable
|
||||
{
|
||||
public function beforeImport($data);
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
|
||||
class InputDocumentsMigrator implements Importable, Exportable
|
||||
{
|
||||
protected $processes;
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: gustav
|
||||
* Date: 3/17/16
|
||||
* Time: 4:35 PM
|
||||
*/
|
||||
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
/**
|
||||
* Class VariablesMigrator
|
||||
* @package ProcessMaker\BusinessModel\Migrator
|
||||
*/
|
||||
|
||||
class VariablesMigrator implements Importable
|
||||
{
|
||||
@@ -22,11 +19,19 @@ class VariablesMigrator implements Importable
|
||||
$this->processes = new \Processes();
|
||||
}
|
||||
|
||||
/**
|
||||
* beforeImport hook
|
||||
* @param $data
|
||||
*/
|
||||
public function beforeImport($data)
|
||||
{
|
||||
// TODO: Implement beforeImport() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports the process variables
|
||||
* @param $data
|
||||
*/
|
||||
public function import($data)
|
||||
{
|
||||
try {
|
||||
@@ -36,9 +41,14 @@ class VariablesMigrator implements Importable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to launch after the import process has just finished
|
||||
* @param $data
|
||||
*/
|
||||
public function afterImport($data)
|
||||
{
|
||||
// TODO: Implement afterImport() method.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user