CODE STYLE class/model/ files
This commit is contained in:
@@ -14,21 +14,20 @@ require_once 'classes/model/om/BaseDashlet.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class Dashlet extends BaseDashlet {
|
class Dashlet extends BaseDashlet
|
||||||
|
{
|
||||||
public function load($dasUid) {
|
public function load($dasUid)
|
||||||
try {
|
{
|
||||||
$dashlet = DashletPeer::retrieveByPK($dasUid);
|
try {
|
||||||
if (!is_null($dashlet)) {
|
$dashlet = DashletPeer::retrieveByPK($dasUid);
|
||||||
return $dashlet->toArray(BasePeer::TYPE_FIELDNAME);
|
if (!is_null($dashlet)) {
|
||||||
}
|
return $dashlet->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
} catch (Exception $error) {
|
||||||
|
throw $error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $error) {
|
}
|
||||||
throw $error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // Dashlet
|
|
||||||
|
|||||||
@@ -14,94 +14,90 @@ require_once 'classes/model/om/BaseDashletInstance.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class DashletInstance extends BaseDashletInstance {
|
class DashletInstance extends BaseDashletInstance
|
||||||
|
{
|
||||||
private $filterThisFields = array('DAS_INS_UID', 'DAS_UID', 'DAS_INS_OWNER_TYPE', 'DAS_INS_OWNER_UID',
|
private $filterThisFields = array('DAS_INS_UID', 'DAS_UID', 'DAS_INS_OWNER_TYPE', 'DAS_INS_OWNER_UID',
|
||||||
'DAS_INS_CREATE_DATE', 'DAS_INS_UPDATE_DATE', 'DAS_INS_STATUS',
|
'DAS_INS_CREATE_DATE', 'DAS_INS_UPDATE_DATE', 'DAS_INS_STATUS',
|
||||||
'pmos_generik', 'ys-admin-tabpanel', 'PHPSESSID');
|
'pmos_generik', 'ys-admin-tabpanel', 'PHPSESSID');
|
||||||
|
|
||||||
public function load($dasInsUid) {
|
public function load($dasInsUid)
|
||||||
try {
|
{
|
||||||
$dashletInstance = DashletInstancePeer::retrieveByPK($dasInsUid);
|
try {
|
||||||
$fields = $dashletInstance->toArray(BasePeer::TYPE_FIELDNAME);
|
$dashletInstance = DashletInstancePeer::retrieveByPK($dasInsUid);
|
||||||
if ($fields['DAS_INS_ADDITIONAL_PROPERTIES'] != '') {
|
$fields = $dashletInstance->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
$fields = array_merge($fields, unserialize($fields['DAS_INS_ADDITIONAL_PROPERTIES']));
|
if ($fields['DAS_INS_ADDITIONAL_PROPERTIES'] != '') {
|
||||||
}
|
$fields = array_merge($fields, unserialize($fields['DAS_INS_ADDITIONAL_PROPERTIES']));
|
||||||
return $fields;
|
}
|
||||||
}
|
return $fields;
|
||||||
catch (Exception $error) {
|
} catch (Exception $error) {
|
||||||
throw $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]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($additionalFields)) {
|
|
||||||
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = serialize($additionalFields);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = '';
|
|
||||||
}
|
|
||||||
$connection = Propel::getConnection(DashletInstancePeer::DATABASE_NAME);
|
|
||||||
try {
|
|
||||||
if (!isset($data['DAS_INS_UID'])) {
|
|
||||||
$data['DAS_INS_UID'] = '';
|
|
||||||
}
|
|
||||||
if ($data['DAS_INS_UID'] == '') {
|
|
||||||
$data['DAS_INS_UID'] = G::generateUniqueID();
|
|
||||||
$data['DAS_INS_CREATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$dashletInstance = new DashletInstance();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$dashletInstance = DashletInstancePeer::retrieveByPK($data['DAS_INS_UID']);
|
|
||||||
}
|
|
||||||
$data['DAS_INS_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
|
||||||
$dashletInstance->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
|
||||||
if ($dashletInstance->validate()) {
|
|
||||||
$connection->begin();
|
|
||||||
$result = $dashletInstance->save();
|
|
||||||
$connection->commit();
|
|
||||||
return $data['DAS_INS_UID'];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$message = '';
|
|
||||||
$validationFailures = $dashletInstance->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 remove($dasInsUid) {
|
public function createOrUpdate($data)
|
||||||
$connection = Propel::getConnection(DashletInstancePeer::DATABASE_NAME);
|
{
|
||||||
try {
|
$additionalFields = array();
|
||||||
$dashletInstance = DashletInstancePeer::retrieveByPK($dasInsUid);
|
foreach ($data as $field => $value) {
|
||||||
if (!is_null($dashletInstance)) {
|
if (!in_array($field, $this->filterThisFields)) {
|
||||||
$connection->begin();
|
$additionalFields[$field] = $value;
|
||||||
$result = $dashletInstance->delete();
|
unset($data[$field]);
|
||||||
$connection->commit();
|
}
|
||||||
return $result;
|
}
|
||||||
}
|
if (!empty($additionalFields)) {
|
||||||
else {
|
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = serialize($additionalFields);
|
||||||
throw new Exception('Error trying to delete: The row "' . $dasInsUid. '" does not exist.');
|
} else {
|
||||||
}
|
$data['DAS_INS_ADDITIONAL_PROPERTIES'] = '';
|
||||||
|
}
|
||||||
|
$connection = Propel::getConnection(DashletInstancePeer::DATABASE_NAME);
|
||||||
|
try {
|
||||||
|
if (!isset($data['DAS_INS_UID'])) {
|
||||||
|
$data['DAS_INS_UID'] = '';
|
||||||
|
}
|
||||||
|
if ($data['DAS_INS_UID'] == '') {
|
||||||
|
$data['DAS_INS_UID'] = G::generateUniqueID();
|
||||||
|
$data['DAS_INS_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
|
$dashletInstance = new DashletInstance();
|
||||||
|
} else {
|
||||||
|
$dashletInstance = DashletInstancePeer::retrieveByPK($data['DAS_INS_UID']);
|
||||||
|
}
|
||||||
|
$data['DAS_INS_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
|
$dashletInstance->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||||
|
if ($dashletInstance->validate()) {
|
||||||
|
$connection->begin();
|
||||||
|
$result = $dashletInstance->save();
|
||||||
|
$connection->commit();
|
||||||
|
return $data['DAS_INS_UID'];
|
||||||
|
} else {
|
||||||
|
$message = '';
|
||||||
|
$validationFailures = $dashletInstance->getValidationFailures();
|
||||||
|
foreach ($validationFailures as $validationFailure) {
|
||||||
|
$message .= $validationFailure->getMessage() . '. ';
|
||||||
|
}
|
||||||
|
throw(new Exception('Error trying to update: ' . $message));
|
||||||
|
}
|
||||||
|
} catch (Exception $error) {
|
||||||
|
$connection->rollback();
|
||||||
|
throw $error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $error) {
|
|
||||||
$connection->rollback();
|
|
||||||
throw $error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // DashletInstance
|
public function remove($dasInsUid)
|
||||||
|
{
|
||||||
|
$connection = Propel::getConnection(DashletInstancePeer::DATABASE_NAME);
|
||||||
|
try {
|
||||||
|
$dashletInstance = DashletInstancePeer::retrieveByPK($dasInsUid);
|
||||||
|
if (!is_null($dashletInstance)) {
|
||||||
|
$connection->begin();
|
||||||
|
$result = $dashletInstance->delete();
|
||||||
|
$connection->commit();
|
||||||
|
return $result;
|
||||||
|
} else {
|
||||||
|
throw new Exception('Error trying to delete: The row "' . $dasInsUid. '" does not exist.');
|
||||||
|
}
|
||||||
|
} catch (Exception $error) {
|
||||||
|
$connection->rollback();
|
||||||
|
throw $error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DASHLET_INSTANCE' table.
|
* Skeleton subclass for performing query and update operations on the 'DASHLET_INSTANCE' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class DashletInstancePeer extends BaseDashletInstancePeer {
|
class DashletInstancePeer extends BaseDashletInstancePeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DashletInstancePeer
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DASHLET' table.
|
* Skeleton subclass for performing query and update operations on the 'DASHLET' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class DashletPeer extends BaseDashletPeer {
|
class DashletPeer extends BaseDashletPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DashletPeer
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class DbSource extends BaseDbSource
|
|||||||
return $oCriteria;
|
return $oCriteria;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load($Uid, $ProUID='')
|
public function load($Uid, $ProUID = '')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oRow = DbSourcePeer::retrieveByPK($Uid, $ProUID);
|
$oRow = DbSourcePeer::retrieveByPK($Uid, $ProUID);
|
||||||
@@ -203,5 +203,4 @@ class DbSource extends BaseDbSource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// DbSource
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DB_SOURCE' table.
|
* Skeleton subclass for performing query and update operations on the 'DB_SOURCE' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DbSourcePeer extends BaseDbSourcePeer {
|
class DbSourcePeer extends BaseDbSourcePeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DbSourcePeer
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class Department extends BaseDepartment
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function create ($aData)
|
public function create ($aData)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -171,8 +171,7 @@ class Department extends BaseDepartment
|
|||||||
* @param string $ProUid the uid of the Prolication
|
* @param string $ProUid the uid of the Prolication
|
||||||
* @return array $Fields the fields
|
* @return array $Fields the fields
|
||||||
*/
|
*/
|
||||||
|
public function Load ($DepUid)
|
||||||
function Load ($DepUid)
|
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -296,7 +295,7 @@ class Department extends BaseDepartment
|
|||||||
* @return array $Fields the fields
|
* @return array $Fields the fields
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function existsDepartment ($DepUid)
|
public function existsDepartment ($DepUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
||||||
$oPro = DepartmentPeer::retrieveByPk( $DepUid );
|
$oPro = DepartmentPeer::retrieveByPk( $DepUid );
|
||||||
@@ -307,7 +306,7 @@ class Department extends BaseDepartment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function existsUserInDepartment ($depId, $userId)
|
public function existsUserInDepartment ($depId, $userId)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
$con = Propel::getConnection( DepartmentPeer::DATABASE_NAME );
|
||||||
$oUser = UsersPeer::retrieveByPk( $userId );
|
$oUser = UsersPeer::retrieveByPk( $userId );
|
||||||
@@ -320,7 +319,7 @@ class Department extends BaseDepartment
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDepartmentManager ($depId)
|
public function updateDepartmentManager ($depId)
|
||||||
{
|
{
|
||||||
$managerId = '';
|
$managerId = '';
|
||||||
$depParent = '';
|
$depParent = '';
|
||||||
@@ -374,7 +373,7 @@ class Department extends BaseDepartment
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add an user to a department and sync all about manager info
|
//add an user to a department and sync all about manager info
|
||||||
function addUserToDepartment ($depId, $userId, $manager, $updateManager = false)
|
public function addUserToDepartment ($depId, $userId, $manager, $updateManager = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//update the field in user table
|
//update the field in user table
|
||||||
@@ -405,7 +404,7 @@ class Department extends BaseDepartment
|
|||||||
|
|
||||||
// select departments
|
// select departments
|
||||||
// this function is used to draw the hierachy tree view
|
// this function is used to draw the hierachy tree view
|
||||||
function getDepartments ($DepParent)
|
public function getDepartments ($DepParent)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$result = array ();
|
$result = array ();
|
||||||
@@ -465,7 +464,7 @@ class Department extends BaseDepartment
|
|||||||
* @return boolean $Fields true or false
|
* @return boolean $Fields true or false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function checkDepartmentName ($departmentName, $parentUID, $departmentUID = '')
|
public function checkDepartmentName ($departmentName, $parentUID, $departmentUID = '')
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
|
||||||
@@ -488,7 +487,7 @@ class Department extends BaseDepartment
|
|||||||
return ($aRow) ? true : false;
|
return ($aRow) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUsersFromDepartment ($sDepUid, $sManagerUid)
|
public function getUsersFromDepartment ($sDepUid, $sManagerUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
@@ -544,7 +543,7 @@ class Department extends BaseDepartment
|
|||||||
* @param string $DepUid, $UsrUid
|
* @param string $DepUid, $UsrUid
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function removeUserFromDepartment ($DepUid, $UsrUid)
|
public function removeUserFromDepartment ($DepUid, $UsrUid)
|
||||||
{
|
{
|
||||||
$aFields = array ('USR_UID' => $UsrUid,'DEP_UID' => '','USR_REPORTS_TO' => ''
|
$aFields = array ('USR_UID' => $UsrUid,'DEP_UID' => '','USR_REPORTS_TO' => ''
|
||||||
);
|
);
|
||||||
@@ -566,7 +565,7 @@ class Department extends BaseDepartment
|
|||||||
* @param string $sGroupUID
|
* @param string $sGroupUID
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
function getAvailableUsersCriteria ($sGroupUID = '')
|
public function getAvailableUsersCriteria ($sGroupUID = '')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
@@ -586,7 +585,7 @@ class Department extends BaseDepartment
|
|||||||
* @param string $sDepUID
|
* @param string $sDepUID
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
function cantUsersInDepartment ($sDepUID)
|
public function cantUsersInDepartment ($sDepUID)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$c = new Criteria( 'workflow' );
|
$c = new Criteria( 'workflow' );
|
||||||
@@ -604,7 +603,7 @@ class Department extends BaseDepartment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadByGroupname ($Groupname)
|
public function loadByGroupname ($Groupname)
|
||||||
{
|
{
|
||||||
$c = new Criteria( 'workflow' );
|
$c = new Criteria( 'workflow' );
|
||||||
$del = DBAdapter::getStringDelimiter();
|
$del = DBAdapter::getStringDelimiter();
|
||||||
@@ -620,7 +619,7 @@ class Department extends BaseDepartment
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Added by Qennix
|
//Added by Qennix
|
||||||
function getAllDepartmentsByUser ()
|
public function getAllDepartmentsByUser ()
|
||||||
{
|
{
|
||||||
$c = new Criteria( 'workflow' );
|
$c = new Criteria( 'workflow' );
|
||||||
$c->addSelectColumn( UsersPeer::USR_UID );
|
$c->addSelectColumn( UsersPeer::USR_UID );
|
||||||
@@ -638,7 +637,7 @@ class Department extends BaseDepartment
|
|||||||
return $aRows;
|
return $aRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDepartmentsForUser ($userUid)
|
public function getDepartmentsForUser ($userUid)
|
||||||
{
|
{
|
||||||
$criteria = new Criteria( 'workflow' );
|
$criteria = new Criteria( 'workflow' );
|
||||||
$criteria->addSelectColumn( UsersPeer::DEP_UID );
|
$criteria->addSelectColumn( UsersPeer::DEP_UID );
|
||||||
@@ -669,5 +668,4 @@ class Department extends BaseDepartment
|
|||||||
return $departments;
|
return $departments;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Department
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* DepartmentPeer.php
|
* DepartmentPeer.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// include base peer class
|
// include base peer class
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DEPARTMENT' table.
|
* Skeleton subclass for performing query and update operations on the 'DEPARTMENT' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DepartmentPeer extends BaseDepartmentPeer {
|
class DepartmentPeer extends BaseDepartmentPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DepartmentPeer
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ require_once 'classes/model/om/BaseDimTimeComplete.php';
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'DIM_TIME_COMPLETE' table.
|
* Skeleton subclass for representing a row from the 'DIM_TIME_COMPLETE' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -18,6 +18,7 @@ require_once 'classes/model/om/BaseDimTimeComplete.php';
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DimTimeComplete extends BaseDimTimeComplete {
|
class DimTimeComplete extends BaseDimTimeComplete
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DimTimeComplete
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DIM_TIME_COMPLETE' table.
|
* Skeleton subclass for performing query and update operations on the 'DIM_TIME_COMPLETE' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DimTimeCompletePeer extends BaseDimTimeCompletePeer {
|
class DimTimeCompletePeer extends BaseDimTimeCompletePeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DimTimeCompletePeer
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ require_once 'classes/model/om/BaseDimTimeDelegate.php';
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'DIM_TIME_DELEGATE' table.
|
* Skeleton subclass for representing a row from the 'DIM_TIME_DELEGATE' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -18,6 +18,7 @@ require_once 'classes/model/om/BaseDimTimeDelegate.php';
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DimTimeDelegate extends BaseDimTimeDelegate {
|
class DimTimeDelegate extends BaseDimTimeDelegate
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DimTimeDelegate
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DIM_TIME_DELEGATE' table.
|
* Skeleton subclass for performing query and update operations on the 'DIM_TIME_DELEGATE' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DimTimeDelegatePeer extends BaseDimTimeDelegatePeer {
|
class DimTimeDelegatePeer extends BaseDimTimeDelegatePeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DimTimeDelegatePeer
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class Dynaform extends BaseDynaform
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function create ($aData)
|
public function create ($aData)
|
||||||
{
|
{
|
||||||
if (! isset( $aData['PRO_UID'] )) {
|
if (! isset( $aData['PRO_UID'] )) {
|
||||||
throw (new PropelException( 'The dynaform cannot be created. The PRO_UID is empty.' ));
|
throw (new PropelException( 'The dynaform cannot be created. The PRO_UID is empty.' ));
|
||||||
@@ -223,7 +223,7 @@ class Dynaform extends BaseDynaform
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function createFromPMTable ($aData, $pmTableUid)
|
public function createFromPMTable ($aData, $pmTableUid)
|
||||||
{
|
{
|
||||||
$this->create( $aData );
|
$this->create( $aData );
|
||||||
$aData['DYN_UID'] = $this->getDynUid();
|
$aData['DYN_UID'] = $this->getDynUid();
|
||||||
@@ -355,7 +355,7 @@ class Dynaform extends BaseDynaform
|
|||||||
* @return array $Fields the fields
|
* @return array $Fields the fields
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function Load ($ProUid)
|
public function Load ($ProUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( DynaformPeer::DATABASE_NAME );
|
$con = Propel::getConnection( DynaformPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -468,7 +468,7 @@ class Dynaform extends BaseDynaform
|
|||||||
* @param string $sProUid the uid of the Prolication
|
* @param string $sProUid the uid of the Prolication
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function dynaformExists ($DynUid)
|
public function dynaformExists ($DynUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( TaskPeer::DATABASE_NAME );
|
$con = Propel::getConnection( TaskPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -483,7 +483,7 @@ class Dynaform extends BaseDynaform
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDynaformContent ($dynaformUid)
|
public function getDynaformContent ($dynaformUid)
|
||||||
{
|
{
|
||||||
$content = '';
|
$content = '';
|
||||||
$fields = $this->Load( $dynaformUid );
|
$fields = $this->Load( $dynaformUid );
|
||||||
@@ -495,7 +495,7 @@ class Dynaform extends BaseDynaform
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDynaformFields ($dynaformUid)
|
public function getDynaformFields ($dynaformUid)
|
||||||
{
|
{
|
||||||
$content = '';
|
$content = '';
|
||||||
$fields = $this->Load( $dynaformUid );
|
$fields = $this->Load( $dynaformUid );
|
||||||
@@ -510,7 +510,7 @@ class Dynaform extends BaseDynaform
|
|||||||
return $G_FORM->fields;
|
return $G_FORM->fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyExistingName ($sName, $sProUid)
|
public function verifyExistingName ($sName, $sProUid)
|
||||||
{
|
{
|
||||||
$sNameDyanform = urldecode( $sName );
|
$sNameDyanform = urldecode( $sName );
|
||||||
$sProUid = urldecode( $sProUid );
|
$sProUid = urldecode( $sProUid );
|
||||||
@@ -540,5 +540,4 @@ class Dynaform extends BaseDynaform
|
|||||||
return $flag;
|
return $flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Dynaform
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* DynaformPeer.php
|
* DynaformPeer.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// include base peer class
|
// include base peer class
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'DYNAFORM' table.
|
* Skeleton subclass for performing query and update operations on the 'DYNAFORM' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class DynaformPeer extends BaseDynaformPeer {
|
class DynaformPeer extends BaseDynaformPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // DynaformPeer
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function create ($aData)
|
public function create ($aData)
|
||||||
{
|
{
|
||||||
if (! isset( $aData['EVN_UID'] ) || $aData['EVN_UID'] == '') {
|
if (! isset( $aData['EVN_UID'] ) || $aData['EVN_UID'] == '') {
|
||||||
$aData['EVN_UID'] = G::generateUniqueID();
|
$aData['EVN_UID'] = G::generateUniqueID();
|
||||||
@@ -226,7 +226,7 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function update ($aData)
|
public function update ($aData)
|
||||||
{
|
{
|
||||||
$oConnection = Propel::getConnection( EventPeer::DATABASE_NAME );
|
$oConnection = Propel::getConnection( EventPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -362,7 +362,7 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove ($sUID)
|
public function remove ($sUID)
|
||||||
{
|
{
|
||||||
$oConnection = Propel::getConnection( EventPeer::DATABASE_NAME );
|
$oConnection = Propel::getConnection( EventPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -407,7 +407,7 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateEventsExecutionDate ()
|
public function calculateEventsExecutionDate ()
|
||||||
{
|
{
|
||||||
$line1 = '';
|
$line1 = '';
|
||||||
$line2 = '';
|
$line2 = '';
|
||||||
@@ -416,7 +416,7 @@ class Event extends BaseEvent
|
|||||||
return $line1 . "<br>\n" . $line2;
|
return $line1 . "<br>\n" . $line2;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateExecutionDateSingle ()
|
public function calculateExecutionDateSingle ()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$rowsCreated = 0;
|
$rowsCreated = 0;
|
||||||
@@ -537,7 +537,7 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateExecutionDateMultiple ()
|
public function calculateExecutionDateMultiple ()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$rowsCreated = 0;
|
$rowsCreated = 0;
|
||||||
@@ -647,9 +647,8 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeAppEvents ($PRO_UID, $APP_UID, $DEL_INDEX, $TAS_UID)
|
public function closeAppEvents ($PRO_UID, $APP_UID, $DEL_INDEX, $TAS_UID)
|
||||||
{
|
{
|
||||||
|
|
||||||
$aAppEvents = $this->getAppEvents( $APP_UID, $DEL_INDEX );
|
$aAppEvents = $this->getAppEvents( $APP_UID, $DEL_INDEX );
|
||||||
if ($aAppEvents) {
|
if ($aAppEvents) {
|
||||||
foreach ($aAppEvents as $aRow) {
|
foreach ($aAppEvents as $aRow) {
|
||||||
@@ -661,10 +660,9 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createAppEvents ($PRO_UID, $APP_UID, $DEL_INDEX, $TAS_UID)
|
public function createAppEvents ($PRO_UID, $APP_UID, $DEL_INDEX, $TAS_UID)
|
||||||
{
|
{
|
||||||
$aRows = Array ();
|
$aRows = Array ();
|
||||||
$aEventsRows = $this->getBy( $PRO_UID, $TAS_UID );
|
$aEventsRows = $this->getBy( $PRO_UID, $TAS_UID );
|
||||||
@@ -728,7 +726,7 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyTaskbetween ($PRO_UID, $taskFrom, $taskTo, $taskVerify)
|
public function verifyTaskbetween ($PRO_UID, $taskFrom, $taskTo, $taskVerify)
|
||||||
{
|
{
|
||||||
$criteria = new Criteria( 'workflow' );
|
$criteria = new Criteria( 'workflow' );
|
||||||
$criteria->addSelectColumn( RoutePeer::ROU_NEXT_TASK );
|
$criteria->addSelectColumn( RoutePeer::ROU_NEXT_TASK );
|
||||||
@@ -756,9 +754,8 @@ class Event extends BaseEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBy ($PRO_UID, $taskUid)
|
public function getBy ($PRO_UID, $taskUid)
|
||||||
{
|
{
|
||||||
|
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( EventPeer::EVN_UID );
|
$oCriteria->addSelectColumn( EventPeer::EVN_UID );
|
||||||
$oCriteria->addSelectColumn( EventPeer::TAS_UID );
|
$oCriteria->addSelectColumn( EventPeer::TAS_UID );
|
||||||
@@ -818,7 +815,7 @@ class Event extends BaseEvent
|
|||||||
return (count( $aRows ) > 0) ? $aRows : false;
|
return (count( $aRows ) > 0) ? $aRows : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAppEvents ($APP_UID, $DEL_INDEX)
|
public function getAppEvents ($APP_UID, $DEL_INDEX)
|
||||||
{
|
{
|
||||||
//for single task event
|
//for single task event
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
@@ -862,7 +859,7 @@ class Event extends BaseEvent
|
|||||||
return (count( $aRows ) > 0) ? $aRows : false;
|
return (count( $aRows ) > 0) ? $aRows : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toCalculateTime ($aData, $iDate = null)
|
public function toCalculateTime ($aData, $iDate = null)
|
||||||
{
|
{
|
||||||
G::LoadClass( 'dates' );
|
G::LoadClass( 'dates' );
|
||||||
$oDates = new dates();
|
$oDates = new dates();
|
||||||
@@ -887,7 +884,7 @@ class Event extends BaseEvent
|
|||||||
return $sActionDate;
|
return $sActionDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Exists ($sUid)
|
public function Exists ($sUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oObj = EventPeer::retrieveByPk( $sUid );
|
$oObj = EventPeer::retrieveByPk( $sUid );
|
||||||
@@ -923,5 +920,4 @@ class Event extends BaseEvent
|
|||||||
return $aRow;
|
return $aRow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Event
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'EVENT' table.
|
* Skeleton subclass for performing query and update operations on the 'EVENT' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class EventPeer extends BaseEventPeer {
|
class EventPeer extends BaseEventPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // EventPeer
|
|
||||||
|
|||||||
@@ -1,351 +1,351 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* FieldCondition.php
|
* FieldCondition.php
|
||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'classes/model/om/BaseFieldCondition.php';
|
require_once 'classes/model/om/BaseFieldCondition.php';
|
||||||
require_once 'classes/model/Dynaform.php';
|
require_once 'classes/model/Dynaform.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'FIELD_CONDITION' table.
|
* Skeleton subclass for representing a row from the 'FIELD_CONDITION' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class FieldCondition extends BaseFieldCondition
|
class FieldCondition extends BaseFieldCondition
|
||||||
{
|
{
|
||||||
|
|
||||||
public $oDynaformHandler;
|
public $oDynaformHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick get all records into a criteria object
|
* Quick get all records into a criteria object
|
||||||
*
|
*
|
||||||
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function get ($UID)
|
public function get ($UID)
|
||||||
{
|
{
|
||||||
|
|
||||||
$obj = FieldConditionPeer::retrieveByPk( $UID );
|
$obj = FieldConditionPeer::retrieveByPk( $UID );
|
||||||
if (! isset( $obj )) {
|
if (! isset( $obj )) {
|
||||||
throw new Exception( "the record with UID: $UID doesn't exits!" );
|
throw new Exception( "the record with UID: $UID doesn't exits!" );
|
||||||
}
|
}
|
||||||
//TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
//TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
return $obj->toArray( BasePeer::TYPE_FIELDNAME );
|
return $obj->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick get all records into a criteria object
|
* Quick get all records into a criteria object
|
||||||
*
|
*
|
||||||
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function getAllCriteriaByDynUid ($DYN_UID, $filter = 'all')
|
public function getAllCriteriaByDynUid ($DYN_UID, $filter = 'all')
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_UID );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_UID );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_FUNCTION );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_FUNCTION );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_FIELDS );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_FIELDS );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_CONDITION );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_CONDITION );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_EVENTS );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_EVENTS );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_EVENT_OWNERS );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_EVENT_OWNERS );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_STATUS );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_STATUS );
|
||||||
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_DYN_UID );
|
$oCriteria->addSelectColumn( FieldConditionPeer::FCD_DYN_UID );
|
||||||
|
|
||||||
$oCriteria->add( FieldConditionPeer::FCD_DYN_UID, $DYN_UID );
|
$oCriteria->add( FieldConditionPeer::FCD_DYN_UID, $DYN_UID );
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'active':
|
case 'active':
|
||||||
$oCriteria->add( FieldConditionPeer::FCD_STATUS, '1', Criteria::EQUAL );
|
$oCriteria->add( FieldConditionPeer::FCD_STATUS, '1', Criteria::EQUAL );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $oCriteria;
|
return $oCriteria;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick get all records into a associative array
|
* Quick get all records into a associative array
|
||||||
*
|
*
|
||||||
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function getAllByDynUid ($DYN_UID, $filter = 'all')
|
public function getAllByDynUid ($DYN_UID, $filter = 'all')
|
||||||
{
|
{
|
||||||
$aRows = Array ();
|
$aRows = Array ();
|
||||||
|
|
||||||
$oCriteria = $this->getAllCriteriaByDynUid( $DYN_UID, $filter );
|
$oCriteria = $this->getAllCriteriaByDynUid( $DYN_UID, $filter );
|
||||||
|
|
||||||
$oDataset = FieldConditionPeer::doSelectRS( $oCriteria );
|
$oDataset = FieldConditionPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
|
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$aRows[] = $aRow;
|
$aRows[] = $aRow;
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $aRows;
|
return $aRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick save a record
|
* Quick save a record
|
||||||
*
|
*
|
||||||
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
* @author Erik A. Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function quickSave ($aData)
|
public function quickSave ($aData)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( FieldConditionPeer::DATABASE_NAME );
|
$con = Propel::getConnection( FieldConditionPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$obj = null;
|
$obj = null;
|
||||||
|
|
||||||
if (isset( $aData['FCD_UID'] ) && trim( $aData['FCD_UID'] ) != '') {
|
if (isset( $aData['FCD_UID'] ) && trim( $aData['FCD_UID'] ) != '') {
|
||||||
$obj = FieldConditionPeer::retrieveByPk( $aData['FCD_UID'] );
|
$obj = FieldConditionPeer::retrieveByPk( $aData['FCD_UID'] );
|
||||||
} else {
|
} else {
|
||||||
$aData['FCD_UID'] = G::generateUniqueID();
|
$aData['FCD_UID'] = G::generateUniqueID();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! is_object( $obj )) {
|
if (! is_object( $obj )) {
|
||||||
$obj = new FieldCondition();
|
$obj = new FieldCondition();
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
$obj->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
|
|
||||||
if ($obj->validate()) {
|
if ($obj->validate()) {
|
||||||
$result = $obj->save();
|
$result = $obj->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||||
$e->aValidationFailures = $obj->getValidationFailures();
|
$e->aValidationFailures = $obj->getValidationFailures();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConditionScript ($DYN_UID)
|
public function getConditionScript ($DYN_UID)
|
||||||
{
|
{
|
||||||
require_once 'classes/model/Dynaform.php';
|
require_once 'classes/model/Dynaform.php';
|
||||||
G::LoadSystem( 'dynaformhandler' );
|
G::LoadSystem( 'dynaformhandler' );
|
||||||
|
|
||||||
$oDynaform = DynaformPeer::retrieveByPk( $DYN_UID );
|
$oDynaform = DynaformPeer::retrieveByPk( $DYN_UID );
|
||||||
$PRO_UID = $oDynaform->getProUid();
|
$PRO_UID = $oDynaform->getProUid();
|
||||||
|
|
||||||
$this->oDynaformHandler = new dynaFormHandler( PATH_DYNAFORM . "$PRO_UID/$DYN_UID" . '.xml' );
|
$this->oDynaformHandler = new dynaFormHandler( PATH_DYNAFORM . "$PRO_UID/$DYN_UID" . '.xml' );
|
||||||
$aDynaformFields = $this->oDynaformHandler->getFieldNames();
|
$aDynaformFields = $this->oDynaformHandler->getFieldNames();
|
||||||
for ($i = 0; $i < count( $aDynaformFields ); $i ++) {
|
for ($i = 0; $i < count( $aDynaformFields ); $i ++) {
|
||||||
$aDynaformFields[$i] = "'$aDynaformFields[$i]'";
|
$aDynaformFields[$i] = "'$aDynaformFields[$i]'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sDynaformFieldsAsStrings = implode( ',', $aDynaformFields );
|
$sDynaformFieldsAsStrings = implode( ',', $aDynaformFields );
|
||||||
|
|
||||||
$aRows = $this->getAllByDynUid( $DYN_UID, 'active' );
|
$aRows = $this->getAllByDynUid( $DYN_UID, 'active' );
|
||||||
$sCode = '';
|
$sCode = '';
|
||||||
|
|
||||||
if (sizeof( $aRows ) != 0) {
|
if (sizeof( $aRows ) != 0) {
|
||||||
foreach ($aRows as $aRow) {
|
foreach ($aRows as $aRow) {
|
||||||
$hashCond = md5( $aRow['FCD_UID'] );
|
$hashCond = md5( $aRow['FCD_UID'] );
|
||||||
$sCondition = $this->parseCondition( $aRow['FCD_CONDITION'] );
|
$sCondition = $this->parseCondition( $aRow['FCD_CONDITION'] );
|
||||||
$sCondition = addslashes( $sCondition );
|
$sCondition = addslashes( $sCondition );
|
||||||
|
|
||||||
$sCode .= "function __condition__$hashCond() { ";
|
$sCode .= "function __condition__$hashCond() { ";
|
||||||
$sCode .= "if( eval(\"{$sCondition}\") ) { ";
|
$sCode .= "if( eval(\"{$sCondition}\") ) { ";
|
||||||
|
|
||||||
$aFields = explode( ',', $aRow['FCD_FIELDS'] );
|
$aFields = explode( ',', $aRow['FCD_FIELDS'] );
|
||||||
|
|
||||||
switch ($aRow['FCD_FUNCTION']) {
|
switch ($aRow['FCD_FUNCTION']) {
|
||||||
case 'show':
|
case 'show':
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$sCode .= "showRowById('$aField');";
|
$sCode .= "showRowById('$aField');";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'showOnly':
|
case 'showOnly':
|
||||||
$sCode .= "hideRowsById(Array($sDynaformFieldsAsStrings));";
|
$sCode .= "hideRowsById(Array($sDynaformFieldsAsStrings));";
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$sCode .= "showRowById('$aField');";
|
$sCode .= "showRowById('$aField');";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'showAll':
|
case 'showAll':
|
||||||
$sCode .= "showRowsById(Array($sDynaformFieldsAsStrings));";
|
$sCode .= "showRowsById(Array($sDynaformFieldsAsStrings));";
|
||||||
break;
|
break;
|
||||||
case 'hide':
|
case 'hide':
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$sCode .= "hideRowById('$aField');";
|
$sCode .= "hideRowById('$aField');";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'hideOnly':
|
case 'hideOnly':
|
||||||
$sCode .= "showRowsById(Array($sDynaformFieldsAsStrings));";
|
$sCode .= "showRowsById(Array($sDynaformFieldsAsStrings));";
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$sCode .= "hideRowById('$aField');";
|
$sCode .= "hideRowById('$aField');";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'hideAll':
|
case 'hideAll':
|
||||||
$aDynaFields = array ();
|
$aDynaFields = array ();
|
||||||
$aEventOwner = explode( ',', $aRow['FCD_EVENT_OWNERS'] );
|
$aEventOwner = explode( ',', $aRow['FCD_EVENT_OWNERS'] );
|
||||||
foreach ($aDynaformFields as $sDynaformFields) {
|
foreach ($aDynaformFields as $sDynaformFields) {
|
||||||
if (! in_array( str_replace( "'", "", $sDynaformFields ), $aEventOwner )) {
|
if (! in_array( str_replace( "'", "", $sDynaformFields ), $aEventOwner )) {
|
||||||
$aDynaFields[] = $sDynaformFields;
|
$aDynaFields[] = $sDynaformFields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sDynaformFieldsAsStrings = implode( ',', $aDynaFields );
|
$sDynaformFieldsAsStrings = implode( ',', $aDynaFields );
|
||||||
$sCode .= "hideRowsById(Array($sDynaformFieldsAsStrings));";
|
$sCode .= "hideRowsById(Array($sDynaformFieldsAsStrings));";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sCode .= " } ";
|
$sCode .= " } ";
|
||||||
$sCode .= "} ";
|
$sCode .= "} ";
|
||||||
$aFieldOwners = explode( ',', $aRow['FCD_EVENT_OWNERS'] );
|
$aFieldOwners = explode( ',', $aRow['FCD_EVENT_OWNERS'] );
|
||||||
$aEvents = explode( ',', $aRow['FCD_EVENTS'] );
|
$aEvents = explode( ',', $aRow['FCD_EVENTS'] );
|
||||||
if (in_array( 'onchange', $aEvents )) {
|
if (in_array( 'onchange', $aEvents )) {
|
||||||
foreach ($aFieldOwners as $aField) {
|
foreach ($aFieldOwners as $aField) {
|
||||||
|
|
||||||
//verify the field type
|
//verify the field type
|
||||||
$node = $this->oDynaformHandler->getNode( $aField );
|
$node = $this->oDynaformHandler->getNode( $aField );
|
||||||
$nodeType = $node->getAttribute( 'type' );
|
$nodeType = $node->getAttribute( 'type' );
|
||||||
|
|
||||||
switch ($nodeType) {
|
switch ($nodeType) {
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
$sJSEvent = 'click';
|
$sJSEvent = 'click';
|
||||||
break;
|
break;
|
||||||
case 'text':
|
case 'text':
|
||||||
case 'textarea':
|
case 'textarea':
|
||||||
case 'currency':
|
case 'currency':
|
||||||
case 'percentage':
|
case 'percentage':
|
||||||
$sJSEvent = 'blur';
|
$sJSEvent = 'blur';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$sJSEvent = 'change';
|
$sJSEvent = 'change';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sCode .= "leimnud.event.add(getField('$aField'), '$sJSEvent', function() {";
|
$sCode .= "leimnud.event.add(getField('$aField'), '$sJSEvent', function() {";
|
||||||
$sCode .= " __condition__$hashCond(); ";
|
$sCode .= " __condition__$hashCond(); ";
|
||||||
$sCode .= "}.extend(getField('$aField')));";
|
$sCode .= "}.extend(getField('$aField')));";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (in_array( 'onload', $aEvents )) {
|
if (in_array( 'onload', $aEvents )) {
|
||||||
foreach ($aFieldOwners as $aField) {
|
foreach ($aFieldOwners as $aField) {
|
||||||
$sCode .= " __condition__$hashCond(); ";
|
$sCode .= " __condition__$hashCond(); ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sCode;
|
return $sCode;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parseCondition ($sCondition)
|
public function parseCondition ($sCondition)
|
||||||
{
|
{
|
||||||
preg_match_all( '/@#[a-zA-Z0-9_.]+/', $sCondition, $result );
|
preg_match_all( '/@#[a-zA-Z0-9_.]+/', $sCondition, $result );
|
||||||
if (sizeof( $result[0] ) > 0) {
|
if (sizeof( $result[0] ) > 0) {
|
||||||
foreach ($result[0] as $fname) {
|
foreach ($result[0] as $fname) {
|
||||||
preg_match_all( '/(@#[a-zA-Z0-9_]+)\.([@#[a-zA-Z0-9_]+)/', $fname, $result2 );
|
preg_match_all( '/(@#[a-zA-Z0-9_]+)\.([@#[a-zA-Z0-9_]+)/', $fname, $result2 );
|
||||||
if (isset( $result2[2][0] ) && $result2[1][0]) {
|
if (isset( $result2[2][0] ) && $result2[1][0]) {
|
||||||
$sCondition = str_replace( $fname, "getField('" . str_replace( '@#', '', $result2[1][0] ) . "')." . $result2[2][0], $sCondition );
|
$sCondition = str_replace( $fname, "getField('" . str_replace( '@#', '', $result2[1][0] ) . "')." . $result2[2][0], $sCondition );
|
||||||
} else {
|
} else {
|
||||||
$field = str_replace( '@#', '', $fname );
|
$field = str_replace( '@#', '', $fname );
|
||||||
$node = $this->oDynaformHandler->getNode( $field );
|
$node = $this->oDynaformHandler->getNode( $field );
|
||||||
if (isset( $node )) {
|
if (isset( $node )) {
|
||||||
$nodeType = $node->getAttribute( 'type' );
|
$nodeType = $node->getAttribute( 'type' );
|
||||||
switch ($nodeType) {
|
switch ($nodeType) {
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
$sAtt = 'checked';
|
$sAtt = 'checked';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$sAtt = 'value';
|
$sAtt = 'value';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sAtt = 'value';
|
$sAtt = 'value';
|
||||||
}
|
}
|
||||||
$sCondition = str_replace( $fname, "getField('" . $field . "').$sAtt", $sCondition );
|
$sCondition = str_replace( $fname, "getField('" . $field . "').$sAtt", $sCondition );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $sCondition;
|
return $sCondition;
|
||||||
}
|
}
|
||||||
public function create ($aData)
|
public function create ($aData)
|
||||||
{
|
{
|
||||||
$oConnection = Propel::getConnection( FieldConditionPeer::DATABASE_NAME );
|
$oConnection = Propel::getConnection( FieldConditionPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
// $aData['FCD_UID'] = '';
|
// $aData['FCD_UID'] = '';
|
||||||
if (isset( $aData['FCD_UID'] ) && $aData['FCD_UID'] == '') {
|
if (isset( $aData['FCD_UID'] ) && $aData['FCD_UID'] == '') {
|
||||||
unset( $aData['FCD_UID'] );
|
unset( $aData['FCD_UID'] );
|
||||||
}
|
}
|
||||||
if (! isset( $aData['FCD_UID'] )) {
|
if (! isset( $aData['FCD_UID'] )) {
|
||||||
$aData['FCD_UID'] = G::generateUniqueID();
|
$aData['FCD_UID'] = G::generateUniqueID();
|
||||||
}
|
}
|
||||||
$oFieldCondition = new FieldCondition();
|
$oFieldCondition = new FieldCondition();
|
||||||
$oFieldCondition->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
$oFieldCondition->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($oFieldCondition->validate()) {
|
if ($oFieldCondition->validate()) {
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
$iResult = $oFieldCondition->save();
|
$iResult = $oFieldCondition->save();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$sMessage = '';
|
$sMessage = '';
|
||||||
$aValidationFailures = $oFieldCondition->getValidationFailures();
|
$aValidationFailures = $oFieldCondition->getValidationFailures();
|
||||||
foreach ($aValidationFailures as $oValidationFailure) {
|
foreach ($aValidationFailures as $oValidationFailure) {
|
||||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||||
}
|
}
|
||||||
throw (new Exception( 'The registry cannot be created!<br />' . $sMessage ));
|
throw (new Exception( 'The registry cannot be created!<br />' . $sMessage ));
|
||||||
}
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
$oConnection->rollback();
|
$oConnection->rollback();
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove ($sUID)
|
public function remove ($sUID)
|
||||||
{
|
{
|
||||||
$oConnection = Propel::getConnection( FieldConditionPeer::DATABASE_NAME );
|
$oConnection = Propel::getConnection( FieldConditionPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
$this->setFcdUid( $sUID );
|
$this->setFcdUid( $sUID );
|
||||||
$iResult = $this->delete();
|
$iResult = $this->delete();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
return $iResult;
|
return $iResult;
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
$oConnection->rollback();
|
$oConnection->rollback();
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fieldConditionExists ($sUid, $aDynaform)
|
public function fieldConditionExists ($sUid, $aDynaform)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$found = false;
|
$found = false;
|
||||||
$obj = FieldConditionPeer::retrieveByPk( $sUid );
|
$obj = FieldConditionPeer::retrieveByPk( $sUid );
|
||||||
if (isset( $obj )) {
|
if (isset( $obj )) {
|
||||||
$aFields = $obj->toArray( BasePeer::TYPE_FIELDNAME );
|
$aFields = $obj->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
foreach ($aDynaform as $key => $row) {
|
foreach ($aDynaform as $key => $row) {
|
||||||
if ($row['DYN_UID'] == $aFields['FCD_DYN_UID']) {
|
if ($row['DYN_UID'] == $aFields['FCD_DYN_UID']) {
|
||||||
$found = true;
|
$found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// return( get_class($obj) == 'FieldCondition') ;
|
// return( get_class($obj) == 'FieldCondition') ;
|
||||||
return ($found);
|
return ($found);
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Exists ($sUid)
|
public function Exists ($sUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$obj = FieldConditionPeer::retrieveByPk( $sUid );
|
$obj = FieldConditionPeer::retrieveByPk( $sUid );
|
||||||
return (is_object( $obj ) && get_class( $obj ) == 'FieldCondition');
|
return (is_object( $obj ) && get_class( $obj ) == 'FieldCondition');
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FieldCondition
|
// FieldCondition
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'FIELD_CONDITION' table.
|
* Skeleton subclass for performing query and update operations on the 'FIELD_CONDITION' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class FieldConditionPeer extends BaseFieldConditionPeer {
|
class FieldConditionPeer extends BaseFieldConditionPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // FieldConditionPeer
|
|
||||||
|
|||||||
@@ -18,106 +18,102 @@ require_once 'classes/model/om/BaseFields.php';
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class Fields extends BaseFields {
|
class Fields extends BaseFields
|
||||||
public function load($sUID) {
|
{
|
||||||
try {
|
public function load($sUID)
|
||||||
$oFields = FieldsPeer::retrieveByPK($sUID);
|
{
|
||||||
if (!is_null($oFields)) {
|
try {
|
||||||
$aFields = $oFields->toArray(BasePeer::TYPE_FIELDNAME);
|
$oFields = FieldsPeer::retrieveByPK($sUID);
|
||||||
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
if (!is_null($oFields)) {
|
||||||
return $aFields;
|
$aFields = $oFields->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
}
|
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
||||||
else {
|
return $aFields;
|
||||||
throw(new Exception('This row doesn\'t exist!'));
|
} else {
|
||||||
}
|
throw(new Exception('This row doesn\'t exist!'));
|
||||||
}
|
}
|
||||||
catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
throw($oError);
|
throw($oError);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function create($aData) {
|
|
||||||
if (!isset($aData['FLD_UID'])) {
|
|
||||||
$aData['FLD_UID'] = G::generateUniqueID();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($aData['FLD_UID'] == '') {
|
|
||||||
$aData['FLD_UID'] = G::generateUniqueID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$oConnection = Propel::getConnection(FieldsPeer::DATABASE_NAME);
|
|
||||||
try {
|
|
||||||
$oFields = new Fields();
|
|
||||||
$oFields->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
|
||||||
if ($oFields->validate()) {
|
|
||||||
$oConnection->begin();
|
|
||||||
$iResult = $oFields->save();
|
|
||||||
$oConnection->commit();
|
|
||||||
return $aData['FLD_UID'];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$sMessage = '';
|
|
||||||
$aValidationFailures = $oFields->getValidationFailures();
|
|
||||||
foreach($aValidationFailures as $oValidationFailure) {
|
|
||||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
|
||||||
}
|
}
|
||||||
throw(new Exception('The registry cannot be created!<br />' . $sMessage));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception $oError) {
|
|
||||||
$oConnection->rollback();
|
|
||||||
throw($oError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function update($aData) {
|
public function create($aData)
|
||||||
$oConnection = Propel::getConnection(FieldsPeer::DATABASE_NAME);
|
{
|
||||||
try {
|
if (!isset($aData['FLD_UID'])) {
|
||||||
$oFields = FieldsPeer::retrieveByPK($aData['FLD_UID']);
|
$aData['FLD_UID'] = G::generateUniqueID();
|
||||||
if (!is_null($oFields)) {
|
} else {
|
||||||
$oFields->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
if ($aData['FLD_UID'] == '') {
|
||||||
if ($oFields->validate()) {
|
$aData['FLD_UID'] = G::generateUniqueID();
|
||||||
$oConnection->begin();
|
}
|
||||||
$iResult = $oFields->save();
|
|
||||||
$oConnection->commit();
|
|
||||||
return $iResult;
|
|
||||||
}
|
}
|
||||||
else {
|
$oConnection = Propel::getConnection(FieldsPeer::DATABASE_NAME);
|
||||||
$sMessage = '';
|
try {
|
||||||
$aValidationFailures = $oFields->getValidationFailures();
|
$oFields = new Fields();
|
||||||
foreach($aValidationFailures as $oValidationFailure) {
|
$oFields->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
if ($oFields->validate()) {
|
||||||
}
|
$oConnection->begin();
|
||||||
throw(new Exception('The registry cannot be updated!<br />'.$sMessage));
|
$iResult = $oFields->save();
|
||||||
|
$oConnection->commit();
|
||||||
|
return $aData['FLD_UID'];
|
||||||
|
} else {
|
||||||
|
$sMessage = '';
|
||||||
|
$aValidationFailures = $oFields->getValidationFailures();
|
||||||
|
foreach ($aValidationFailures as $oValidationFailure) {
|
||||||
|
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||||
|
}
|
||||||
|
throw(new Exception('The registry cannot be created!<br />' . $sMessage));
|
||||||
|
}
|
||||||
|
} catch (Exception $oError) {
|
||||||
|
$oConnection->rollback();
|
||||||
|
throw($oError);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw(new Exception('This row doesn\'t exist!'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception $oError) {
|
|
||||||
$oConnection->rollback();
|
|
||||||
throw($oError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function remove($sUID) {
|
public function update($aData)
|
||||||
$oConnection = Propel::getConnection(FieldsPeer::DATABASE_NAME);
|
{
|
||||||
try {
|
$oConnection = Propel::getConnection(FieldsPeer::DATABASE_NAME);
|
||||||
$oFields = FieldsPeer::retrieveByPK($sUID);
|
try {
|
||||||
if (!is_null($oFields)) {
|
$oFields = FieldsPeer::retrieveByPK($aData['FLD_UID']);
|
||||||
$oConnection->begin();
|
if (!is_null($oFields)) {
|
||||||
$iResult = $oFields->delete();
|
$oFields->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||||
$oConnection->commit();
|
if ($oFields->validate()) {
|
||||||
return $iResult;
|
$oConnection->begin();
|
||||||
}
|
$iResult = $oFields->save();
|
||||||
else {
|
$oConnection->commit();
|
||||||
throw(new Exception('This row doesn\'t exist!'));
|
return $iResult;
|
||||||
}
|
} else {
|
||||||
|
$sMessage = '';
|
||||||
|
$aValidationFailures = $oFields->getValidationFailures();
|
||||||
|
foreach ($aValidationFailures as $oValidationFailure) {
|
||||||
|
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||||
|
}
|
||||||
|
throw(new Exception('The registry cannot be updated!<br />'.$sMessage));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw(new Exception('This row doesn\'t exist!'));
|
||||||
|
}
|
||||||
|
} catch (Exception $oError) {
|
||||||
|
$oConnection->rollback();
|
||||||
|
throw($oError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $oError) {
|
|
||||||
$oConnection->rollback();
|
public function remove($sUID)
|
||||||
throw($oError);
|
{
|
||||||
|
$oConnection = Propel::getConnection(FieldsPeer::DATABASE_NAME);
|
||||||
|
try {
|
||||||
|
$oFields = FieldsPeer::retrieveByPK($sUID);
|
||||||
|
if (!is_null($oFields)) {
|
||||||
|
$oConnection->begin();
|
||||||
|
$iResult = $oFields->delete();
|
||||||
|
$oConnection->commit();
|
||||||
|
return $iResult;
|
||||||
|
} else {
|
||||||
|
throw(new Exception('This row doesn\'t exist!'));
|
||||||
|
}
|
||||||
|
} catch (Exception $oError) {
|
||||||
|
$oConnection->rollback();
|
||||||
|
throw($oError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Fields
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'FIELDS' table.
|
* Skeleton subclass for performing query and update operations on the 'FIELDS' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class FieldsPeer extends BaseFieldsPeer {
|
class FieldsPeer extends BaseFieldsPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // FieldsPeer
|
|
||||||
|
|||||||
@@ -1,166 +1,165 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Gateway.php
|
* Gateway.php
|
||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'classes/model/om/BaseGateway.php';
|
require_once 'classes/model/om/BaseGateway.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'GATEWAY' table.
|
* Skeleton subclass for representing a row from the 'GATEWAY' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class Gateway extends BaseGateway
|
class Gateway extends BaseGateway
|
||||||
{
|
{
|
||||||
|
|
||||||
public function create ($aData)
|
public function create ($aData)
|
||||||
{
|
{
|
||||||
$oConnection = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
$oConnection = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$sGatewayUID = G::generateUniqueID();
|
$sGatewayUID = G::generateUniqueID();
|
||||||
$aData['GAT_UID'] = $sGatewayUID;
|
$aData['GAT_UID'] = $sGatewayUID;
|
||||||
$oGateway = new Gateway();
|
$oGateway = new Gateway();
|
||||||
$oGateway->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
$oGateway->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($oGateway->validate()) {
|
if ($oGateway->validate()) {
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
$iResult = $oGateway->save();
|
$iResult = $oGateway->save();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
return $sGatewayUID;
|
return $sGatewayUID;
|
||||||
} else {
|
} else {
|
||||||
$sMessage = '';
|
$sMessage = '';
|
||||||
$aValidationFailures = $oGateway->getValidationFailures();
|
$aValidationFailures = $oGateway->getValidationFailures();
|
||||||
foreach ($aValidationFailures as $oValidationFailure) {
|
foreach ($aValidationFailures as $oValidationFailure) {
|
||||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||||
}
|
}
|
||||||
throw (new Exception( 'The registry cannot be created!<br />' . $sMessage ));
|
throw (new Exception( 'The registry cannot be created!<br />' . $sMessage ));
|
||||||
}
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
$oConnection->rollback();
|
$oConnection->rollback();
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load ($GatewayUid)
|
public function load ($GatewayUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oRow = GatewayPeer::retrieveByPK( $GatewayUid );
|
$oRow = GatewayPeer::retrieveByPK( $GatewayUid );
|
||||||
if (! is_null( $oRow )) {
|
if (! is_null( $oRow )) {
|
||||||
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
|
||||||
$this->setNew( false );
|
$this->setNew( false );
|
||||||
return $aFields;
|
return $aFields;
|
||||||
} else {
|
} else {
|
||||||
throw (new Exception( "The row '" . $GatewayUid . "' in table Gateway doesn't exist!" ));
|
throw (new Exception( "The row '" . $GatewayUid . "' in table Gateway doesn't exist!" ));
|
||||||
}
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update ($fields)
|
public function update ($fields)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$this->load( $fields['GAT_UID'] );
|
$this->load( $fields['GAT_UID'] );
|
||||||
$this->fromArray( $fields, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray( $fields, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove ($GatewayUid)
|
public function remove ($GatewayUid)
|
||||||
{
|
{
|
||||||
$oConnection = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
$oConnection = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$oGateWay = GatewayPeer::retrieveByPK( $GatewayUid );
|
$oGateWay = GatewayPeer::retrieveByPK( $GatewayUid );
|
||||||
if (! is_null( $oGateWay )) {
|
if (! is_null( $oGateWay )) {
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
$iResult = $oGateWay->delete();
|
$iResult = $oGateWay->delete();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
//return $iResult;
|
//return $iResult;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
throw (new Exception( 'This row does not exist!' ));
|
throw (new Exception( 'This row does not exist!' ));
|
||||||
}
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
$oConnection->rollback();
|
$oConnection->rollback();
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* verify if Gateway row specified in [GatUid] exists.
|
* verify if Gateway row specified in [GatUid] exists.
|
||||||
*
|
*
|
||||||
* @param string $sProUid the uid of the Prolication
|
* @param string $sProUid the uid of the Prolication
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function gatewayExists ($GatUid)
|
public function gatewayExists ($GatUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$oPro = GatewayPeer::retrieveByPk( $GatUid );
|
$oPro = GatewayPeer::retrieveByPk( $GatUid );
|
||||||
if (is_object( $oPro ) && get_class( $oPro ) == 'Gateway') {
|
if (is_object( $oPro ) && get_class( $oPro ) == 'Gateway') {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a new Gateway
|
* create a new Gateway
|
||||||
*
|
*
|
||||||
* @param array $aData with new values
|
* @param array $aData with new values
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function createRow ($aData)
|
public function createRow ($aData)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GatewayPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
|
|
||||||
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$this->setGatUid( (isset( $aData['GAT_UID'] ) ? $aData['GAT_UID'] : '') );
|
$this->setGatUid( (isset( $aData['GAT_UID'] ) ? $aData['GAT_UID'] : '') );
|
||||||
$this->setProUid( (isset( $aData['PRO_UID'] ) ? $aData['PRO_UID'] : '') );
|
$this->setProUid( (isset( $aData['PRO_UID'] ) ? $aData['PRO_UID'] : '') );
|
||||||
$this->setTasUid( (isset( $aData['TAS_UID'] ) ? $aData['TAS_UID'] : '') );
|
$this->setTasUid( (isset( $aData['TAS_UID'] ) ? $aData['TAS_UID'] : '') );
|
||||||
$this->setGatNextTask( (isset( $aData['GAT_NEXT_TASK'] ) ? $aData['GAT_NEXT_TASK'] : '') );
|
$this->setGatNextTask( (isset( $aData['GAT_NEXT_TASK'] ) ? $aData['GAT_NEXT_TASK'] : '') );
|
||||||
$this->setGatX( (isset( $aData['GAT_X'] ) ? $aData['GAT_X'] : '') );
|
$this->setGatX( (isset( $aData['GAT_X'] ) ? $aData['GAT_X'] : '') );
|
||||||
$this->setGatY( (isset( $aData['GAT_Y'] ) ? $aData['GAT_Y'] : '') );
|
$this->setGatY( (isset( $aData['GAT_Y'] ) ? $aData['GAT_Y'] : '') );
|
||||||
$this->save();
|
$this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||||
$e->aValidationFailures = $this->getValidationFailures();
|
$e->aValidationFailures = $this->getValidationFailures();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Gateway
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'GATEWAY' table.
|
* Skeleton subclass for performing query and update operations on the 'GATEWAY' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class GatewayPeer extends BaseGatewayPeer {
|
class GatewayPeer extends BaseGatewayPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // GatewayPeer
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class GroupUser extends BaseGroupUser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCountAllUsersByGroup ()
|
public function getCountAllUsersByGroup ()
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( GroupUserPeer::GRP_UID );
|
$oCriteria->addSelectColumn( GroupUserPeer::GRP_UID );
|
||||||
@@ -119,7 +119,7 @@ class GroupUser extends BaseGroupUser
|
|||||||
return $aRows;
|
return $aRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllUserGroups ($usrUid)
|
public function getAllUserGroups ($usrUid)
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( GroupUserPeer::USR_UID, $usrUid );
|
$oCriteria->add( GroupUserPeer::USR_UID, $usrUid );
|
||||||
@@ -143,5 +143,4 @@ class GroupUser extends BaseGroupUser
|
|||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// GroupUser
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* GroupUserPeer.php
|
* GroupUserPeer.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// include base peer class
|
// include base peer class
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'GROUP_USER' table.
|
* Skeleton subclass for performing query and update operations on the 'GROUP_USER' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class GroupUserPeer extends BaseGroupUserPeer {
|
class GroupUserPeer extends BaseGroupUserPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // GroupUserPeer
|
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
* @param array $aData $oData is not necessary
|
* @param array $aData $oData is not necessary
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
public function create ($aData)
|
||||||
function create ($aData)
|
|
||||||
{
|
{
|
||||||
//$oData is not necessary
|
//$oData is not necessary
|
||||||
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
||||||
@@ -153,8 +152,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
* @param string $ProUid the uid of the Prolication
|
* @param string $ProUid the uid of the Prolication
|
||||||
* @return array $Fields the fields
|
* @return array $Fields the fields
|
||||||
*/
|
*/
|
||||||
|
public function Load ($ProUid)
|
||||||
function Load ($ProUid)
|
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -180,7 +178,6 @@ class Groupwf extends BaseGroupwf
|
|||||||
* @return variant
|
* @return variant
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function update ($aData)
|
public function update ($aData)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
||||||
@@ -245,7 +242,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
* @param string $sProUid the uid of the Prolication
|
* @param string $sProUid the uid of the Prolication
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function GroupwfExists ($GrpUid)
|
public function GroupwfExists ($GrpUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
$con = Propel::getConnection( GroupwfPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -260,7 +257,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadByGroupname ($Groupname)
|
public function loadByGroupname ($Groupname)
|
||||||
{
|
{
|
||||||
$c = new Criteria( 'workflow' );
|
$c = new Criteria( 'workflow' );
|
||||||
$del = DBAdapter::getStringDelimiter();
|
$del = DBAdapter::getStringDelimiter();
|
||||||
@@ -275,7 +272,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAll ($start = null, $limit = null, $search = null)
|
public function getAll ($start = null, $limit = null, $search = null)
|
||||||
{
|
{
|
||||||
$totalCount = 0;
|
$totalCount = 0;
|
||||||
$criteria = new Criteria( 'workflow' );
|
$criteria = new Criteria( 'workflow' );
|
||||||
@@ -325,7 +322,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllGroup ($start = null, $limit = null, $search = null)
|
public function getAllGroup ($start = null, $limit = null, $search = null)
|
||||||
{
|
{
|
||||||
require_once PATH_RBAC . "model/RbacUsers.php";
|
require_once PATH_RBAC . "model/RbacUsers.php";
|
||||||
require_once 'classes/model/TaskUser.php';
|
require_once 'classes/model/TaskUser.php';
|
||||||
@@ -382,7 +379,7 @@ class Groupwf extends BaseGroupwf
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterGroup ($filter, $start, $limit)
|
public function filterGroup ($filter, $start, $limit)
|
||||||
{
|
{
|
||||||
require_once 'classes/model/Groupwf.php';
|
require_once 'classes/model/Groupwf.php';
|
||||||
require_once 'classes/model/TaskUser.php';
|
require_once 'classes/model/TaskUser.php';
|
||||||
@@ -428,5 +425,4 @@ class Groupwf extends BaseGroupwf
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Groupwf
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* GroupwfPeer.php
|
* GroupwfPeer.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// include base peer class
|
// include base peer class
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'GROUPWF' table.
|
* Skeleton subclass for performing query and update operations on the 'GROUPWF' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class GroupwfPeer extends BaseGroupwfPeer {
|
class GroupwfPeer extends BaseGroupwfPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // GroupwfPeer
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* Holiday.php
|
* Holiday.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'classes/model/om/BaseHoliday.php';
|
require_once 'classes/model/om/BaseHoliday.php';
|
||||||
@@ -30,7 +30,7 @@ require_once 'classes/model/om/BaseHoliday.php';
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'HOLIDAY' table.
|
* Skeleton subclass for representing a row from the 'HOLIDAY' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -38,6 +38,7 @@ require_once 'classes/model/om/BaseHoliday.php';
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class Holiday extends BaseHoliday {
|
class Holiday extends BaseHoliday
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // Holiday
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* HolidayPeer.php
|
* HolidayPeer.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// include base peer class
|
// include base peer class
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'HOLIDAY' table.
|
* Skeleton subclass for performing query and update operations on the 'HOLIDAY' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class HolidayPeer extends BaseHolidayPeer {
|
class HolidayPeer extends BaseHolidayPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // HolidayPeer
|
|
||||||
|
|||||||
Reference in New Issue
Block a user