Adding the features ui adhoc
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,6 +19,7 @@ workflow/engine/gulliver
|
||||
workflow/public_html/index.html
|
||||
.DS_Store
|
||||
.idea
|
||||
nbproject/
|
||||
composer.phar
|
||||
composer.lock
|
||||
vendor/
|
||||
|
||||
534
gulliver/js/codemirror/addon/hint/php-hint.js
vendored
534
gulliver/js/codemirror/addon/hint/php-hint.js
vendored
File diff suppressed because it is too large
Load Diff
10
workflow/engine/classes/features/ConfigurationHandler.php
Normal file
10
workflow/engine/classes/features/ConfigurationHandler.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Description of ConfigurationManager
|
||||
*
|
||||
*/
|
||||
class ConfigurationHandler
|
||||
{
|
||||
//put your code here
|
||||
}
|
||||
20
workflow/engine/classes/features/EnterpriseFeature.php
Normal file
20
workflow/engine/classes/features/EnterpriseFeature.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Features\ActionsByEnmail;
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author gustav
|
||||
*/
|
||||
interface EnterpriseFeature
|
||||
{
|
||||
public function setup();
|
||||
public function install();
|
||||
public function enable();
|
||||
public function disable();
|
||||
}
|
||||
20
workflow/engine/classes/features/ExtensionManager.php
Normal file
20
workflow/engine/classes/features/ExtensionManager.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Description of ExtensionManager
|
||||
*
|
||||
*/
|
||||
class ExtensionManager
|
||||
{
|
||||
public function registerView($view, ExtensionContainer $container)
|
||||
{
|
||||
$view = $this->prepareView($view);
|
||||
$container->register($view);
|
||||
}
|
||||
|
||||
public function prepareView($view)
|
||||
{
|
||||
return $view;
|
||||
}
|
||||
|
||||
}
|
||||
10
workflow/engine/classes/features/FeatureHandler.php
Normal file
10
workflow/engine/classes/features/FeatureHandler.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Description of FeatureManager
|
||||
*
|
||||
*/
|
||||
class FeatureHandler
|
||||
{
|
||||
//put your code here
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Features\ViewContainers;
|
||||
/**
|
||||
* Description of TaskContainer
|
||||
*
|
||||
*/
|
||||
class TaskContainer extends ViewContainer
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Features\ViewContainers;
|
||||
/**
|
||||
* Description of TriggerContainer
|
||||
*
|
||||
*/
|
||||
class TriggerContainer extends ViewContainer
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Features\ViewContainers;
|
||||
/**
|
||||
* Description of Container
|
||||
*
|
||||
*/
|
||||
class ViewContainer
|
||||
{
|
||||
protected $viewList = array();
|
||||
|
||||
public function register($view)
|
||||
{
|
||||
$this->viewList[] = $view;
|
||||
}
|
||||
|
||||
public function getView($id)
|
||||
{
|
||||
return $this->viewList[$id];
|
||||
}
|
||||
|
||||
public function getAllViews()
|
||||
{
|
||||
return $this->viewList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$oHeadPublisher->addExtJsScript('actionsByEmail/report', false); //adding a javascript file .js
|
||||
//$oHeadPublisher->addContent('cases/casesListExtJs'); //adding a html file .html.
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Description of ActionsByEmailFeature
|
||||
*
|
||||
*/
|
||||
namespace Features\ActionsByEnmail;
|
||||
|
||||
class ActionsByEmailFeature implements EnterpriseFeature
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function enable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function disable()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/**
|
||||
* The Actions By Email plugin allows to perform actions on cases from an email sent to an user,
|
||||
* in this first version it allows to fill out a form or select a value from one field to derivate
|
||||
* the case later.
|
||||
*
|
||||
* @author Julio Cesar Laura <juliocesar at colosa dot com> <contact at julio-laura dot com>
|
||||
* @author Marco Antonio Nina <marcoantonionina at colosa dot com>
|
||||
* @package plugins.actionsByEmail
|
||||
* @copyright Copyright (C) 2004 - 2012 Colosa Inc.
|
||||
*/
|
||||
|
||||
// Verify that the plugin "enterprisePlugin" is installed
|
||||
if (!class_exists('enterprisePlugin')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load dependences
|
||||
G::LoadClass('plugin');
|
||||
|
||||
class actionsByEmailPlugin extends enterprisePlugin
|
||||
{
|
||||
public function __construct($namespace, $filename = null)
|
||||
{
|
||||
$result = parent::PMPlugin($namespace, $filename);
|
||||
$config = parse_ini_file(PATH_PLUGINS . 'actionsByEmail' . PATH_SEP . 'pluginConfig.ini');
|
||||
$this->sFriendlyName = $config['name'];
|
||||
$this->sDescription = $config['description'];
|
||||
$this->sPluginFolder = $config['pluginFolder'];
|
||||
$this->sSetupPage = $config['setupPage'];
|
||||
$this->iVersion = self::getPluginVersion($namespace);
|
||||
$this->aWorkspaces = null;
|
||||
$this->aDependences = array(array('sClassName' => 'enterprise'), array('sClassName' => 'pmLicenseManager'));
|
||||
$this->bPrivate = parent::registerEE($this->sPluginFolder, $this->iVersion);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
try {
|
||||
// Register the extended tab for the task properties
|
||||
$this->registerTaskExtendedProperty('actionsByEmail/configActionsByEmail', "Actions by Email");
|
||||
//$this->registerTaskExtendedProperty('actionsByEmail/configActionsByEmail', 'Actions by Email');
|
||||
$this->registerMenu('setup', 'menusetup.php');
|
||||
|
||||
// Register the trigger for the hook PM_CREATE_NEW_DELEGATION
|
||||
if (!defined('PM_CREATE_NEW_DELEGATION')) {
|
||||
throw new Exception('It might be using a version of ProcessMaker which is not totally compatible with this plugin, the minimun required version is 2.0.37');
|
||||
}
|
||||
|
||||
$this->registerTrigger(PM_CREATE_NEW_DELEGATION, 'sendActionsByEmail');
|
||||
|
||||
// Register the external step for the tracking form
|
||||
//$this->registerStep('4939290144f0745f5ddb1d1019823738', 'externalStep', 'Actions by Email - Tracking Form'); // ToDo: For the next release
|
||||
} catch (Exception $error) {
|
||||
//G::SendMessageText($error->getMessage(), 'WARNING');
|
||||
}
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
$this->checkTables();
|
||||
}
|
||||
|
||||
public function enable()
|
||||
{
|
||||
$this->checkTables();
|
||||
}
|
||||
|
||||
public function disable()
|
||||
{
|
||||
// Nothing to do for now
|
||||
}
|
||||
|
||||
/**
|
||||
* This method get the version of this plugin, when the plugin is packaged in the tar.gz
|
||||
* the file "version" in the plugin folder has this information for development purposes,
|
||||
* we calculate the version using git commands, because the repository is in GIT
|
||||
*
|
||||
* @param String $namespace The namespace of the plugin
|
||||
* @return String $version
|
||||
*/
|
||||
private static function getPluginVersion($namespace)
|
||||
{
|
||||
return "2.0.20";
|
||||
}
|
||||
|
||||
public function checkTables()
|
||||
{
|
||||
$con = Propel::getConnection('workflow');
|
||||
$stmt = $con->createStatement();
|
||||
// setting the path of the sql schema files
|
||||
$filenameSql = PATH_PLUGINS . 'actionsByEmail/data/schema.sql';
|
||||
|
||||
// checking the existence of the schema file
|
||||
if (!file_exists($filenameSql)) {
|
||||
throw new Exception("File data/schema.sql doesn't exists");
|
||||
}
|
||||
|
||||
// exploding the sql query in an array
|
||||
$sql = explode(';', file_get_contents($filenameSql));
|
||||
|
||||
$stmt->executeQuery('SET FOREIGN_KEY_CHECKS = 0;');
|
||||
|
||||
// executing each query stored in the array
|
||||
foreach ($sql as $sentence) {
|
||||
if (trim($sentence) != '') {
|
||||
$stmt->executeQuery($sentence);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerPlugin('actionsByEmail', __FILE__);
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm name="actionByEmail Setup Form" type="xmlform" width="550">
|
||||
<TITLE type="title" group="1">
|
||||
<en>Action By Email Plugin</en>
|
||||
<pt-BR><![CDATA[Ação por Email Plugin]]></pt-BR>
|
||||
</TITLE>
|
||||
<HelpText type="subtitle" maxlength="100" size="60">
|
||||
<en>There is no further configuration needed.</en>
|
||||
<pt-BR><![CDATA[Não há nenhuma configuração adicional necessária.]]></pt-BR>
|
||||
</HelpText>
|
||||
</dynaForm>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
|
||||
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
<div class="content" style="height:{$form_height};" >
|
||||
<table width="99%">
|
||||
<tr>
|
||||
<td valign='top'>
|
||||
<input type="hidden" name="__notValidateThisFields__" id="__notValidateThisFields__" value="" />
|
||||
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value='{$form_objectRequiredFields}' />
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr style="display: none">
|
||||
<td colspan="2">{$form.TEMPLATE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormTitle' colspan="2" align="">{$form.THETITLE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormFieldContent' colspan="2">{$form.CONTENT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormButton' colspan="2" align="center">{$form.ACCEPT} {$form.CANCEL}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
{$form.JS}
|
||||
try {literal}{{/literal} dynaformSetFocus();}catch(e){literal}{{/literal}}
|
||||
</script>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm name="actionsByEmail_FileEdit" type="xmlform" width="100%" enableTemplate="1">
|
||||
<TEMPLATE type="hidden" defaultValue=""/>
|
||||
<THETITLE type="title" enableHTML="1">
|
||||
<en><![CDATA[<div align="center">Edit @#TEMPLATE email template</div>]]></en>
|
||||
<pt-BR><![CDATA[<div align="center">Editar @#TEMPLATE de e-mail template</div>]]></pt-BR>
|
||||
</THETITLE>
|
||||
<CONTENT type="html" height="420" width="100%" defaultValue="">
|
||||
<en/>
|
||||
<pt-BR/>
|
||||
</CONTENT>
|
||||
<ACCEPT type="button" onclick="saveFile();">
|
||||
<en>Save</en>
|
||||
<pt-BR><![CDATA[Salvar]]></pt-BR>
|
||||
</ACCEPT>
|
||||
<CANCEL type="button" onclick="cancel();">
|
||||
<en>Cancel</en>
|
||||
<pt-BR><![CDATA[Cancelar]]></pt-BR>
|
||||
</CANCEL>
|
||||
<JS type="javascript" replacetags="1"><![CDATA[
|
||||
var cancel = function () {
|
||||
oPanel.remove();
|
||||
};
|
||||
|
||||
var saveFile = function() {
|
||||
var fc64 = base64_encode(getField('CONTENT').value);
|
||||
fc64 = fc64.replace(/&/g, '@amp@');
|
||||
fc64 = fc64.replace(/\+/g, '%2B');
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url: '../actionsByEmail/actionsByEmailAjax',
|
||||
args: 'action=updateTemplate&PRO_UID=' + Pm.options.uid + '&TEMPLATE=' + getField('TEMPLATE').value + '&CONTENT=' + fc64
|
||||
});
|
||||
oPanel.loader.show();
|
||||
oRPC.callback = function(rpc) {
|
||||
oPanel.remove();
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
};
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
class actionsByEmailClass extends PMPlugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
set_include_path(PATH_PLUGINS . 'actionsByEmail' . PATH_SEPARATOR . get_include_path());
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
}
|
||||
|
||||
public function getFieldsForPageSetup()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function updateFieldsForPageSetup()
|
||||
{
|
||||
}
|
||||
|
||||
public function sendActionsByEmail($data)
|
||||
{
|
||||
try {
|
||||
// Validations
|
||||
if (!is_object($data)) {
|
||||
throw new Exception('The parameter $data is null.');
|
||||
}
|
||||
|
||||
if (!isset($data->TAS_UID)) {
|
||||
throw new Exception('The parameter $data->TAS_UID is null.');
|
||||
}
|
||||
|
||||
if (!isset($data->APP_UID)) {
|
||||
throw new Exception('The parameter $data->APP_UID is null.');
|
||||
}
|
||||
|
||||
if (!isset($data->DEL_INDEX)) {
|
||||
throw new Exception('The parameter $data->DEL_INDEX is null.');
|
||||
}
|
||||
|
||||
if ($data->TAS_UID == '') {
|
||||
throw new Exception('The parameter $data->TAS_UID is empty.');
|
||||
}
|
||||
|
||||
if ($data->APP_UID == '') {
|
||||
throw new Exception('The parameter $data->APP_UID is empty.');
|
||||
}
|
||||
|
||||
if ($data->DEL_INDEX == '') {
|
||||
throw new Exception('The parameter $data->DEL_INDEX is empty.');
|
||||
}
|
||||
|
||||
G::LoadClass('pmFunctions');
|
||||
|
||||
$emailSetup = getEmailConfiguration();
|
||||
|
||||
if (!empty($emailSetup)) {
|
||||
require_once 'classes/model/AbeConfiguration.php';
|
||||
G::LoadClass('case');
|
||||
|
||||
$cases = new Cases();
|
||||
$caseFields = $cases->loadCase($data->APP_UID);
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(AbeConfigurationPeer::PRO_UID, $caseFields['PRO_UID']);
|
||||
$criteria->add(AbeConfigurationPeer::TAS_UID, $data->TAS_UID);
|
||||
$result = AbeConfigurationPeer::doSelectRS($criteria);
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$result->next();
|
||||
|
||||
if ($configuration = $result->getRow()) {
|
||||
if ($configuration['ABE_EMAIL_FIELD'] != '' && isset($caseFields['APP_DATA'][$configuration['ABE_EMAIL_FIELD']])) {
|
||||
$email = trim($caseFields['APP_DATA'][$configuration['ABE_EMAIL_FIELD']]);
|
||||
} else {
|
||||
require_once 'classes/model/Users.php';
|
||||
|
||||
$userInstance = new Users();
|
||||
$userInfo = $userInstance->getAllInformation($data->USR_UID);
|
||||
$email = $userInfo['mail'];
|
||||
}
|
||||
|
||||
if ($email != '') {
|
||||
$subject = $caseFields['APP_TITLE'];
|
||||
|
||||
// Create
|
||||
require_once 'classes/model/AbeRequests.php';
|
||||
|
||||
$abeRequest = array();
|
||||
$abeRequest['ABE_REQ_UID'] = '';
|
||||
$abeRequest['ABE_UID'] = $configuration['ABE_UID'];
|
||||
$abeRequest['APP_UID'] = $data->APP_UID;
|
||||
$abeRequest['DEL_INDEX'] = $data->DEL_INDEX;
|
||||
$abeRequest['ABE_REQ_SENT_TO'] = $email;
|
||||
$abeRequest['ABE_REQ_SUBJECT'] = $subject;
|
||||
$abeRequest['ABE_REQ_BODY'] = '';
|
||||
$abeRequest['ABE_REQ_ANSWERED'] = 0;
|
||||
$abeRequest['ABE_REQ_STATUS'] = 'PENDING';
|
||||
|
||||
try {
|
||||
$abeRequestsInstance = new AbeRequests();
|
||||
$abeRequest['ABE_REQ_UID'] = $abeRequestsInstance->createOrUpdate($abeRequest);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
|
||||
if ($configuration['ABE_TYPE'] != '') {
|
||||
// Email
|
||||
$_SESSION['CURRENT_DYN_UID'] = $configuration['DYN_UID'];
|
||||
|
||||
$scriptCode = '';
|
||||
$dynaform = new Form($caseFields['PRO_UID'] . PATH_SEP . $configuration['DYN_UID'], PATH_DYNAFORM, SYS_LANG, false);
|
||||
$dynaform->mode = 'view';
|
||||
$dynaform->values = $caseFields['APP_DATA'];
|
||||
|
||||
foreach ($dynaform->fields as $fieldName => $field) {
|
||||
if ($field->type == 'submit') {
|
||||
unset($dynaform->fields[$fieldName]);
|
||||
}
|
||||
}
|
||||
|
||||
$__ABE__ = '';
|
||||
$link = (G::is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/actionsByEmail/services/';
|
||||
|
||||
switch ($configuration['ABE_TYPE']) {
|
||||
case 'LINK':
|
||||
$__ABE__ .= $dynaform->render(PATH_PLUGINS . 'actionsByEmail/xmlform.html', $scriptCode) . '<br />';
|
||||
$__ABE__ .= '<a href="' . $link . 'dataForm?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&DYN_UID=' . G::encrypt($configuration['DYN_UID'], URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Please complete this form</a>';
|
||||
break;
|
||||
// coment
|
||||
case 'FIELD':
|
||||
if (isset($dynaform->fields[$configuration['ABE_ACTION_FIELD']])) {
|
||||
$field = $dynaform->fields[$configuration['ABE_ACTION_FIELD']];
|
||||
unset($dynaform->fields[$configuration['ABE_ACTION_FIELD']]);
|
||||
$__ABE__ .= $dynaform->render(PATH_PLUGINS . 'actionsByEmail/xmlform.html', $scriptCode) . '<br />';
|
||||
$__ABE__ .= '<strong>' . $field->label . '</strong><br /><table align="left" border="0"><tr>';
|
||||
|
||||
switch ($field->type) {
|
||||
case 'dropdown':
|
||||
case 'radiogroup':
|
||||
$field->executeSQL($field->owner);
|
||||
$index = 1;
|
||||
$__ABE__.='<br /><td><table align="left" cellpadding="2"><tr>';
|
||||
|
||||
foreach ($field->options as $optValue => $optName) {
|
||||
$__ABE__ .= '<td align="center"><a style="text-decoration: none; color: #000; background-color: #E5E5E5; ';
|
||||
$__ABE__ .= 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFEFEF, endColorstr=#BCBCBC); ';
|
||||
$__ABE__ .= 'background-image: -webkit-gradient(linear, left top, left bottom, from(#EFEFEF), #BCBCBC); ';
|
||||
$__ABE__ .= 'background-image: -webkit-linear-gradient(top, #EFEFEF, #BCBCBC); ';
|
||||
$__ABE__ .= 'background-image: -moz-linear-gradient(top, #EFEFEF, #BCBCBC); background-image: -ms-linear-gradient(top, #EFEFEF, #BCBCBC); ';
|
||||
$__ABE__ .= 'background-image: -o-linear-gradient(top, #EFEFEF, #BCBCBC); border: 1px solid #AAAAAA; ';
|
||||
$__ABE__ .= 'border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); ';
|
||||
$__ABE__ .= 'font-family: Arial,serif; font-size: 9pt; font-weight: 400; line-height: 14px; margin: 2px 0; padding: 2px 7px; ';
|
||||
$__ABE__ .= 'text-decoration: none; text-transform: capitalize;" href="' .urldecode(urlencode($link)). 'dataField?APP_UID=';
|
||||
$__ABE__ .= G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY);
|
||||
$__ABE__ .= '&FIELD=' . G::encrypt($configuration['ABE_ACTION_FIELD'], URL_KEY) . '&VALUE=' . G::encrypt($optValue, URL_KEY);
|
||||
$__ABE__ .= '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank" >' . $optName;
|
||||
$__ABE__ .= '</a></td>' . (($index % 5 == 0) ? '</tr><tr>' : ' ');
|
||||
$index++;
|
||||
}
|
||||
|
||||
$__ABE__.='</tr></table></td>';
|
||||
break;
|
||||
case 'yesno':
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . urlencode(G::encrypt($data->APP_UID, URL_KEY)) . '&DEL_INDEX=' . urlencode(G::encrypt($data->DEL_INDEX, URL_KEY)). '&FIELD=' . urlencode(G::encrypt($configuration['ABE_ACTION_FIELD'], URL_KEY)) . '&VALUE=' . urlencode(G::encrypt(1, URL_KEY)) . '&ABER=' . urlencode(G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY)) . '" target="_blank">' . G::LoadTranslation('ID_YES_VALUE') . '</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . urlencode(G::encrypt($data->APP_UID, URL_KEY)) . '&DEL_INDEX=' . urlencode(G::encrypt($data->DEL_INDEX, URL_KEY)) . '&FIELD=' . urlencode(G::encrypt($configuration['ABE_ACTION_FIELD'], URL_KEY)) . '&VALUE=' . urlencode(G::encrypt(0, URL_KEY)) . '&ABER=' . urlencode(G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY)) . '" target="_blank">' . G::LoadTranslation('ID_NO_VALUE') . '</a></td>';
|
||||
break;
|
||||
case 'checkbox':
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&FIELD=' . G::encrypt($configuration['ABE_ACTION_FIELD'], URL_KEY) . '&VALUE=' . G::encrypt($field->value, URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Check</a></td>';
|
||||
$__ABE__ .= '<td align="center"><a href="' . $link . 'dataField?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&FIELD=' . G::encrypt($configuration['ABE_ACTION_FIELD'], URL_KEY) . '&VALUE=' . G::encrypt($field->value, URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Uncheck</a></td>';
|
||||
break;
|
||||
}
|
||||
|
||||
$__ABE__ .= '</tr></table>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$__ABE__ = preg_replace('/\<img src=\"\/js\/maborak\/core\/images\/(.+?)\>/', '' , $__ABE__);
|
||||
$__ABE__ = preg_replace('/\<input\b[^>]*\/>/', '' , $__ABE__);
|
||||
$__ABE__ = preg_replace('/<select\b[^>]*>(.*?)<\/select>/is', "", $__ABE__);
|
||||
$__ABE__ = preg_replace('/align=\"center\"/', '' , $__ABE__);
|
||||
$__ABE__ = preg_replace('/class="tableGrid_view" /', 'class="tableGrid_view" width="100%" ', $__ABE__);
|
||||
$caseFields['APP_DATA']['__ABE__'] = $__ABE__;
|
||||
|
||||
G::LoadClass("Users");
|
||||
|
||||
$user = new Users();
|
||||
$userDetails = $user->loadDetails($data->USR_UID);
|
||||
$emailFrom = $userDetails["USR_EMAIL"];
|
||||
|
||||
G::LoadClass('wsBase');
|
||||
|
||||
$wsBaseInstance = new wsBase();
|
||||
$result = $wsBaseInstance->sendMessage($data->APP_UID,
|
||||
$emailFrom,
|
||||
$email,
|
||||
'',
|
||||
'',
|
||||
$subject,
|
||||
$configuration['ABE_TEMPLATE'],
|
||||
$caseFields['APP_DATA'],
|
||||
'');
|
||||
$abeRequest['ABE_REQ_STATUS'] = ($result->status_code == 0 ? 'SENT' : 'ERROR');
|
||||
|
||||
$body = '';
|
||||
$messageSent = executeQuery('SELECT `APP_MSG_BODY` FROM `APP_MESSAGE` ORDER BY `APP_MSG_SEND_DATE` DESC LIMIT 1');
|
||||
|
||||
if (!empty($messageSent) && is_array($messageSent)) {
|
||||
$body = $messageSent[1]['APP_MSG_BODY'];
|
||||
}
|
||||
|
||||
$abeRequest['ABE_REQ_BODY'] = $body;
|
||||
|
||||
// Update
|
||||
try {
|
||||
$abeRequestsInstance = new AbeRequests();
|
||||
$abeRequestsInstance->createOrUpdate($abeRequest);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
require_once 'classes/model/om/BaseAbeConfiguration.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'ABE_CONFIGURATION' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AbeConfiguration extends BaseAbeConfiguration
|
||||
{
|
||||
|
||||
private $filterThisFields = array('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE',
|
||||
'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID','ABE_EMAIL_FIELD',
|
||||
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE');
|
||||
|
||||
public function load($abeUid)
|
||||
{
|
||||
try {
|
||||
$abeConfigurationInstance = AbeConfigurationPeer::retrieveByPK($abeUid);
|
||||
$fields = $abeConfigurationInstance->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
return $fields;
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
|
||||
public function createOrUpdate($data)
|
||||
{
|
||||
foreach ($data as $field => $value) {
|
||||
if (!in_array($field, $this->filterThisFields)) {
|
||||
unset($data[$field]);
|
||||
}
|
||||
}
|
||||
|
||||
$connection = Propel::getConnection(AbeConfigurationPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
if (!isset($data['ABE_UID'])) {
|
||||
$data['ABE_UID'] = '';
|
||||
}
|
||||
|
||||
if ($data['ABE_UID'] == '') {
|
||||
$data['ABE_UID'] = G::generateUniqueID();
|
||||
$data['ABE_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$abeConfigurationInstance = new AbeConfiguration();
|
||||
} else {
|
||||
$abeConfigurationInstance = AbeConfigurationPeer::retrieveByPK($data['ABE_UID']);
|
||||
}
|
||||
|
||||
$data['ABE_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$abeConfigurationInstance->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
if ($abeConfigurationInstance->validate()) {
|
||||
$connection->begin();
|
||||
$result = $abeConfigurationInstance->save();
|
||||
$connection->commit();
|
||||
|
||||
return $data['ABE_UID'];
|
||||
} else {
|
||||
$message = '';
|
||||
$validationFailures = $abeConfigurationInstance->getValidationFailures();
|
||||
|
||||
foreach ($validationFailures as $validationFailure) {
|
||||
$message .= $validationFailure->getMessage() . '. ';
|
||||
}
|
||||
|
||||
throw (new Exception('Error trying to update: ' . $message));
|
||||
}
|
||||
} catch (Exception $error) {
|
||||
$connection->rollback();
|
||||
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteByTasUid($tasUid)
|
||||
{
|
||||
try {
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(AbeConfigurationPeer::TAS_UID, $tasUid);
|
||||
AbeConfigurationPeer::doDelete($criteria);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AbeConfiguration
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseAbeConfigurationPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/AbeConfiguration.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'ABE_CONFIGURATION' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AbeConfigurationPeer extends BaseAbeConfigurationPeer
|
||||
{
|
||||
}
|
||||
|
||||
// AbeConfigurationPeer
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
require_once 'classes/model/om/BaseAbeRequests.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'ABE_REQUESTS' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AbeRequests extends BaseAbeRequests
|
||||
{
|
||||
private $filterThisFields = array('ABE_REQ_UID', 'ABE_UID', 'APP_UID', 'DEL_INDEX',
|
||||
'ABE_REQ_SENT_TO', 'ABE_REQ_SUBJECT', 'ABE_REQ_BODY',
|
||||
'ABE_REQ_DATE', 'ABE_REQ_STATUS', 'ABE_REQ_ANSWERED');
|
||||
|
||||
public function load($abeRequestUid)
|
||||
{
|
||||
try {
|
||||
$abeRequestInstance = AbeRequestsPeer::retrieveByPK($abeRequestUid);
|
||||
$fields = $abeRequestInstance->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
return $fields;
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
|
||||
public function createOrUpdate($data)
|
||||
{
|
||||
$additionalFields = array();
|
||||
|
||||
foreach ($data as $field => $value) {
|
||||
if (!in_array($field, $this->filterThisFields)) {
|
||||
$additionalFields[$field] = $value;
|
||||
unset($data[$field]);
|
||||
}
|
||||
}
|
||||
|
||||
$connection = Propel::getConnection(AbeRequestsPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
if (!isset($data['ABE_REQ_UID'])) {
|
||||
$data['ABE_REQ_UID'] = '';
|
||||
}
|
||||
|
||||
if ($data['ABE_REQ_UID'] == '') {
|
||||
$data['ABE_REQ_UID'] = G::generateUniqueID();
|
||||
$data['ABE_REQ_DATE'] = date('Y-m-d H:i:s');
|
||||
$AbeRequestsInstance = new AbeRequests();
|
||||
} else {
|
||||
$AbeRequestsInstance = AbeRequestsPeer::retrieveByPK($data['ABE_REQ_UID']);
|
||||
}
|
||||
|
||||
$AbeRequestsInstance->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
if ($AbeRequestsInstance->validate()) {
|
||||
$connection->begin();
|
||||
$result = $AbeRequestsInstance->save();
|
||||
$connection->commit();
|
||||
|
||||
return $data['ABE_REQ_UID'];
|
||||
} else {
|
||||
$message = '';
|
||||
$validationFailures = $AbeRequestsInstance->getValidationFailures();
|
||||
|
||||
foreach ($validationFailures as $validationFailure) {
|
||||
$message .= $validationFailure->getMessage() . '. ';
|
||||
}
|
||||
|
||||
throw(new Exception('Error trying to update: ' . $message));
|
||||
}
|
||||
} catch (Exception $error) {
|
||||
$connection->rollback();
|
||||
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AbeRequests
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseAbeRequestsPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/AbeRequests.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'ABE_REQUESTS' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AbeRequestsPeer extends BaseAbeRequestsPeer
|
||||
{
|
||||
}
|
||||
|
||||
// AbeRequestsPeer
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
require_once 'classes/model/om/BaseAbeResponses.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'ABE_RESPONSES' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AbeResponses extends BaseAbeResponses
|
||||
{
|
||||
|
||||
private $filterThisFields = array('ABE_RES_UID', 'ABE_REQ_UID', 'ABE_RES_CLIENT_IP', 'ABE_RES_DATA',
|
||||
'ABE_RES_DATE', 'ABE_RES_STATUS', 'ABE_RES_MESSAGE');
|
||||
|
||||
public function load($abeResponsesUid)
|
||||
{
|
||||
try {
|
||||
$abeResponsesInstance = AbeResponsesPeer::retrieveByPK($abeResponsesUid);
|
||||
$fields = $abeResponsesInstance->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
return $fields;
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
|
||||
public function createOrUpdate($data)
|
||||
{
|
||||
$additionalFields = array();
|
||||
|
||||
foreach ($data as $field => $value) {
|
||||
if (!in_array($field, $this->filterThisFields)) {
|
||||
$additionalFields[$field] = $value;
|
||||
unset($data[$field]);
|
||||
}
|
||||
}
|
||||
|
||||
$connection = Propel::getConnection(AbeResponsesPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
if (!isset($data['ABE_RES_UID'])) {
|
||||
$data['ABE_RES_UID'] = '';
|
||||
}
|
||||
|
||||
if ($data['ABE_RES_UID'] == '') {
|
||||
$data['ABE_RES_UID'] = G::generateUniqueID();
|
||||
$data['ABE_RES_DATE'] = date('Y-m-d H:i:s');
|
||||
$AbeResponsesInstance = new AbeResponses();
|
||||
} else {
|
||||
$AbeResponsesInstance = AbeResponsesPeer::retrieveByPK($data['ABE_RES_UID']);
|
||||
}
|
||||
|
||||
//$data['ABE_RES_UPDATE'] = date('Y-m-d H:i:s');
|
||||
$AbeResponsesInstance->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
if ($AbeResponsesInstance->validate()) {
|
||||
$connection->begin();
|
||||
$result = $AbeResponsesInstance->save();
|
||||
$connection->commit();
|
||||
|
||||
return $data['ABE_RES_UID'];
|
||||
} else {
|
||||
$message = '';
|
||||
$validationFailures = $AbeResponsesInstance->getValidationFailures();
|
||||
|
||||
foreach ($validationFailures as $validationFailure) {
|
||||
$message .= $validationFailure->getMessage() . '. ';
|
||||
}
|
||||
|
||||
throw(new Exception('Error trying to update: ' . $message));
|
||||
}
|
||||
} catch (Exception $error) {
|
||||
$connection->rollback();
|
||||
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AbeResponses
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseAbeResponsesPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/AbeResponses.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'ABE_RESPONSES' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
|
||||
class AbeResponsesPeer extends BaseAbeResponsesPeer
|
||||
{
|
||||
}
|
||||
|
||||
// AbeResponsesPeer
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'ABE_CONFIGURATION' table to 'workflow' DatabaseMap object.
|
||||
*
|
||||
*
|
||||
*
|
||||
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package workflow.classes.model.map
|
||||
*/
|
||||
class AbeConfigurationMapBuilder
|
||||
{
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.AbeConfigurationMapBuilder';
|
||||
|
||||
/**
|
||||
* The database map.
|
||||
*/
|
||||
private $dbMap;
|
||||
|
||||
/**
|
||||
* Tells us if this DatabaseMapBuilder is built so that we
|
||||
* don't have to re-build it every time.
|
||||
*
|
||||
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||
*/
|
||||
public function isBuilt()
|
||||
{
|
||||
return ($this->dbMap !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the databasemap this map builder built.
|
||||
*
|
||||
* @return the databasemap
|
||||
*/
|
||||
public function getDatabaseMap()
|
||||
{
|
||||
return $this->dbMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* The doBuild() method builds the DatabaseMap
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function doBuild()
|
||||
{
|
||||
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||
|
||||
$tMap = $this->dbMap->addTable('ABE_CONFIGURATION');
|
||||
$tMap->setPhpName('AbeConfiguration');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('ABE_UID', 'AbeUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('ABE_TYPE', 'AbeType', 'string', CreoleTypes::VARCHAR, true, 10);
|
||||
|
||||
$tMap->addColumn('ABE_TEMPLATE', 'AbeTemplate', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('ABE_DYN_TYPE', 'AbeDynType', 'string', CreoleTypes::VARCHAR, true, 10);
|
||||
|
||||
$tMap->addColumn('DYN_UID', 'DynUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('ABE_EMAIL_FIELD', 'AbeEmailField', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('ABE_ACTION_FIELD', 'AbeActionField', 'string', CreoleTypes::VARCHAR, false, 255);
|
||||
|
||||
$tMap->addColumn('ABE_CASE_NOTE_IN_RESPONSE', 'AbeCaseNoteInResponse', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
$tMap->addColumn('ABE_CREATE_DATE', 'AbeCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
} // doBuild()
|
||||
}
|
||||
|
||||
// AbeConfigurationMapBuilder
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'ABE_REQUESTS' table to 'workflow' DatabaseMap object.
|
||||
*
|
||||
*
|
||||
*
|
||||
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package workflow.classes.model.map
|
||||
*/
|
||||
class AbeRequestsMapBuilder
|
||||
{
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.AbeRequestsMapBuilder';
|
||||
|
||||
/**
|
||||
* The database map.
|
||||
*/
|
||||
private $dbMap;
|
||||
|
||||
/**
|
||||
* Tells us if this DatabaseMapBuilder is built so that we
|
||||
* don't have to re-build it every time.
|
||||
*
|
||||
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||
*/
|
||||
public function isBuilt()
|
||||
{
|
||||
return ($this->dbMap !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the databasemap this map builder built.
|
||||
*
|
||||
* @return the databasemap
|
||||
*/
|
||||
public function getDatabaseMap()
|
||||
{
|
||||
return $this->dbMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* The doBuild() method builds the DatabaseMap
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function doBuild()
|
||||
{
|
||||
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||
|
||||
$tMap = $this->dbMap->addTable('ABE_REQUESTS');
|
||||
$tMap->setPhpName('AbeRequests');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('ABE_REQ_UID', 'AbeReqUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('ABE_UID', 'AbeUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_SENT_TO', 'AbeReqSentTo', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_SUBJECT', 'AbeReqSubject', 'string', CreoleTypes::VARCHAR, true, 150);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_BODY', 'AbeReqBody', 'string', CreoleTypes::LONGVARCHAR, true, null);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_DATE', 'AbeReqDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_STATUS', 'AbeReqStatus', 'string', CreoleTypes::VARCHAR, false, 10);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_ANSWERED', 'AbeReqAnswered', 'int', CreoleTypes::TINYINT, true, null);
|
||||
} // doBuild()
|
||||
}
|
||||
|
||||
// AbeRequestsMapBuilder
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'ABE_RESPONSES' table to 'workflow' DatabaseMap object.
|
||||
*
|
||||
*
|
||||
*
|
||||
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package workflow.classes.model.map
|
||||
*/
|
||||
class AbeResponsesMapBuilder
|
||||
{
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.AbeResponsesMapBuilder';
|
||||
|
||||
/**
|
||||
* The database map.
|
||||
*/
|
||||
private $dbMap;
|
||||
|
||||
/**
|
||||
* Tells us if this DatabaseMapBuilder is built so that we
|
||||
* don't have to re-build it every time.
|
||||
*
|
||||
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||
*/
|
||||
public function isBuilt()
|
||||
{
|
||||
return ($this->dbMap !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the databasemap this map builder built.
|
||||
*
|
||||
* @return the databasemap
|
||||
*/
|
||||
public function getDatabaseMap()
|
||||
{
|
||||
return $this->dbMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* The doBuild() method builds the DatabaseMap
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function doBuild()
|
||||
{
|
||||
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||
|
||||
$tMap = $this->dbMap->addTable('ABE_RESPONSES');
|
||||
$tMap->setPhpName('AbeResponses');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('ABE_RES_UID', 'AbeResUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('ABE_REQ_UID', 'AbeReqUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('ABE_RES_CLIENT_IP', 'AbeResClientIp', 'string', CreoleTypes::VARCHAR, true, 20);
|
||||
|
||||
$tMap->addColumn('ABE_RES_DATA', 'AbeResData', 'string', CreoleTypes::LONGVARCHAR, true, null);
|
||||
|
||||
$tMap->addColumn('ABE_RES_DATE', 'AbeResDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('ABE_RES_STATUS', 'AbeResStatus', 'string', CreoleTypes::VARCHAR, true, 10);
|
||||
|
||||
$tMap->addColumn('ABE_RES_MESSAGE', 'AbeResMessage', 'string', CreoleTypes::VARCHAR, false, 255);
|
||||
} // doBuild()
|
||||
}
|
||||
|
||||
// AbeResponsesMapBuilder
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user