Adding a flag to distinguish between files and templates in the getFilesManager class

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-03-21 12:34:33 -04:00
parent b0b07bec9c
commit c0a5e03ccd
7 changed files with 40 additions and 20 deletions

View File

@@ -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
{

View File

@@ -1,7 +1,7 @@
<?php
namespace ProcessMaker\BusinessModel\Migrator;
// Declare the interface 'iTemplate'
// Declare the interface 'Exportable'
interface Exportable
{
public function beforeExport();

View File

@@ -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";

View File

@@ -1,7 +1,7 @@
<?php
namespace ProcessMaker\BusinessModel\Migrator;
// Declare the interface 'iTemplate'
// Declare the interface 'Importable'
interface Importable
{
public function beforeImport($data);

View File

@@ -8,8 +8,6 @@
namespace ProcessMaker\BusinessModel\Migrator;
use Symfony\Component\Config\Definition\Exception\Exception;
class InputDocumentsMigrator implements Importable, Exportable
{
protected $processes;

View File

@@ -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.
}
}