This commit is contained in:
Paula Quispe
2017-10-13 15:02:14 -04:00
parent 958e1255a8
commit b26beb72c4
5 changed files with 263 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
<?php
require_once 'classes/model/om/BaseListInbox.php';
use ProcessMaker\BusinessModel\Cases as BmCases;
/**
* Skeleton subclass for representing a row from the 'LIST_INBOX' table.
@@ -13,17 +14,60 @@ require_once 'classes/model/om/BaseListInbox.php';
*
* @package classes.model
*/
// @codingStandardsIgnoreStart
class ListInbox extends BaseListInbox
{
private $additionalClassName = '';
private $userDisplayFormat = '';
/**
* Get the $additionalClassName value.
*
* @return string
*/
public function getAdditionalClassName()
{
return $this->additionalClassName;
}
/**
* Set the value of $additionalClassName.
*
* @param string $v new value
* @return void
*/
public function setAdditionalClassName($v)
{
$this->additionalClassName = $v;
}
/**
* Get the $userDisplayFormat value.
*
* @return string
*/
public function getUserDisplayFormat()
{
return $this->userDisplayFormat;
}
/**
* Set the value of $userDisplayFormat.
*
* @param string $v new value
* @return void
*/
public function setUserDisplayFormat($v)
{
$this->userDisplayFormat = $v;
}
/**
* Create List Inbox Table
*
* @param type $data
* @return type
*
* @throws Exception
*/
public function create($data, $isSelfService = false)
{
@@ -115,7 +159,7 @@ class ListInbox extends BaseListInbox
*
* @param type $data
* @return type
* @throws type
* @throws Exception
*/
public function update($data, $isSelfService = false)
{
@@ -209,7 +253,7 @@ class ListInbox extends BaseListInbox
*
* @param type $seqName
* @return type
* @throws type
* @throws Exception
*
*/
public function remove($app_uid, $del_index)
@@ -233,7 +277,7 @@ class ListInbox extends BaseListInbox
*
* @param type $seqName
* @return type
* @throws type
* @throws Exception
*
*/
public function removeAll($app_uid)
@@ -478,8 +522,14 @@ class ListInbox extends BaseListInbox
$criteria->add(ListInboxPeer::APP_UID, $search, Criteria::EQUAL);
} else {
//If we have additional tables configured in the custom cases list, prepare the variables for search
$casesList = new \ProcessMaker\BusinessModel\Cases();
$casesList->getSearchCriteriaListCases($criteria, __CLASS__ . 'Peer', $search, $this->additionalClassName, $additionalColumns);
$casesList = new BmCases();
$casesList->getSearchCriteriaListCases(
$criteria,
__CLASS__ . 'Peer',
$search,
$this->getAdditionalClassName(),
$additionalColumns
);
}
}
@@ -515,7 +565,7 @@ class ListInbox extends BaseListInbox
* This function get the information in the corresponding cases list
* @param string $usr_uid, must be show cases related to this user
* @param array $filters for apply in the result
* @param null $callbackRecord
* @param callable $callbackRecord
* @return array $data
* @throws PropelException
*/
@@ -524,7 +574,7 @@ class ListInbox extends BaseListInbox
$pmTable = new PmTable();
$list = isset($filters['action']) ? $filters['action'] : "";
$criteria = $pmTable->addPMFieldsToList($list);
$this->additionalClassName = $pmTable->tableClassName;
$this->setAdditionalClassName($pmTable->tableClassName);
$additionalColumns = $criteria->getSelectColumns();
$filters['usr_uid'] = $usr_uid;
@@ -556,14 +606,16 @@ class ListInbox extends BaseListInbox
self::loadFilters($criteria, $filters, $additionalColumns);
//We will be defined the sort
$casesList = new \ProcessMaker\BusinessModel\Cases();
$casesList = new BmCases();
$sort = $casesList->getSortColumn(
__CLASS__ . 'Peer',
BasePeer::TYPE_FIELDNAME,
empty($filters['sort']) ? "APP_UPDATE_DATE" : $filters['sort'],
"APP_UPDATE_DATE",
$this->additionalClassName,
$additionalColumns
$this->getAdditionalClassName(),
$additionalColumns,
$this->getUserDisplayFormat()
);
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";

View File

@@ -1,7 +1,7 @@
<?php
// @codingStandardsIgnoreStart
require_once 'classes/model/om/BaseListParticipatedLast.php';
use ProcessMaker\BusinessModel\Cases as BmCases;
/**
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_LAST' table.
@@ -15,6 +15,49 @@ require_once 'classes/model/om/BaseListParticipatedLast.php';
class ListParticipatedLast extends BaseListParticipatedLast
{
private $additionalClassName = '';
private $userDisplayFormat = '';
/**
* Get the $additionalClassName value.
*
* @return string
*/
public function getAdditionalClassName()
{
return $this->additionalClassName;
}
/**
* Set the value of $additionalClassName.
*
* @param string $v new value
* @return void
*/
public function setAdditionalClassName($v)
{
$this->additionalClassName = $v;
}
/**
* Get the $userDisplayFormat value.
*
* @return string
*/
public function getUserDisplayFormat()
{
return $this->userDisplayFormat;
}
/**
* Set the value of $userDisplayFormat.
*
* @param string $v new value
* @return void
*/
public function setUserDisplayFormat($v)
{
$this->userDisplayFormat = $v;
}
/**
* Create List Participated History Table.
@@ -22,6 +65,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
* @param type $data
*
* @return type
* @throws Exception
*/
public function create($data)
{
@@ -142,7 +186,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
*
* @return type
*
* @throws type
* @throws Exception
*/
public function update($data)
{
@@ -180,11 +224,12 @@ class ListParticipatedLast extends BaseListParticipatedLast
/**
* Refresh List Participated Last.
*
* @param type $seqName
* @param array $data
* @param boolean $isSelfService
*
* @return type
*
* @throws type
* @throws Exception
*/
public function refresh($data, $isSelfService = false)
{
@@ -235,11 +280,13 @@ class ListParticipatedLast extends BaseListParticipatedLast
/**
* Remove List Participated History.
*
* @param type $seqName
* @param string $app_uid
* @param string $usr_uid
* @param integer $del_index
*
* @return type
*
* @throws type
* @throws Exception
*/
public function remove($app_uid, $usr_uid, $del_index)
{
@@ -319,8 +366,14 @@ class ListParticipatedLast extends BaseListParticipatedLast
$criteria->add(ListParticipatedLastPeer::APP_UID, $search, Criteria::EQUAL);
} else {
//If we have additional tables configured in the custom cases list, prepare the variables for search
$casesList = new \ProcessMaker\BusinessModel\Cases();
$casesList->getSearchCriteriaListCases($criteria, __CLASS__ . 'Peer', $search, $this->additionalClassName, $additionalColumns);
$casesList = new BmCases();
$casesList->getSearchCriteriaListCases(
$criteria,
__CLASS__ . 'Peer',
$search,
$this->getAdditionalClassName(),
$additionalColumns
);
}
}
@@ -352,7 +405,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
* This function get the information in the corresponding cases list
* @param string $usr_uid, must be show cases related to this user
* @param array $filters for apply in the result
* @param null $callbackRecord
* @param callable $callbackRecord
* @param string $appUid related to the specific case
* @return array $data
* @throws PropelException
@@ -361,7 +414,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
{
$pmTable = new PmTable();
$criteria = $pmTable->addPMFieldsToList('sent');
$this->additionalClassName = $pmTable->tableClassName;
$this->setAdditionalClassName($pmTable->tableClassName);
$additionalColumns = $criteria->getSelectColumns();
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_UID);
@@ -397,14 +450,15 @@ class ListParticipatedLast extends BaseListParticipatedLast
self::loadFilters($criteria, $filters, $additionalColumns);
//We will be defined the sort
$casesList = new \ProcessMaker\BusinessModel\Cases();
$casesList = new BmCases();
$sort = $casesList->getSortColumn(
__CLASS__ . 'Peer',
BasePeer::TYPE_FIELDNAME,
empty($filters['sort']) ? "DEL_DELEGATE_DATE" : $filters['sort'],
"DEL_DELEGATE_DATE",
$this->additionalClassName,
$additionalColumns
$this->getAdditionalClassName(),
$additionalColumns,
$this->getUserDisplayFormat()
);
$dir = isset($filters['dir']) ? $filters['dir'] : 'ASC';

View File

@@ -1,7 +1,7 @@
<?php
require_once 'classes/model/om/BaseListPaused.php';
use ProcessMaker\BusinessModel\Cases as BmCases;
/**
* Skeleton subclass for representing a row from the 'LIST_PAUSED' table.
@@ -14,17 +14,60 @@ require_once 'classes/model/om/BaseListPaused.php';
*
* @package classes.model
*/
// @codingStandardsIgnoreStart
class ListPaused extends BaseListPaused
{
private $additionalClassName = '';
private $userDisplayFormat = '';
/**
* Get the $additionalClassName value.
*
* @return string
*/
public function getAdditionalClassName()
{
return $this->additionalClassName;
}
/**
* Set the value of $additionalClassName.
*
* @param string $v new value
* @return void
*/
public function setAdditionalClassName($v)
{
$this->additionalClassName = $v;
}
/**
* Get the $userDisplayFormat value.
*
* @return string
*/
public function getUserDisplayFormat()
{
return $this->userDisplayFormat;
}
/**
* Set the value of $userDisplayFormat.
*
* @param string $v new value
* @return void
*/
public function setUserDisplayFormat($v)
{
$this->userDisplayFormat = $v;
}
/**
* Create List Paused Table
*
* @param type $data
* @return type
*
* @throws Exception
*/
public function create($data)
{
@@ -153,7 +196,7 @@ class ListPaused extends BaseListPaused
*
* @param type $data
* @return type
* @throws type
* @throws Exception
*/
public function update($data)
{
@@ -187,9 +230,12 @@ class ListPaused extends BaseListPaused
/**
* Remove List Paused
*
* @param type $seqName
* @param string $app_uid
* @param integer $del_index
* @param array $data_inbox
*
* @return type
* @throws type
* @throws Exception
*
*/
public function remove($app_uid, $del_index, $data_inbox)
@@ -246,8 +292,14 @@ class ListPaused extends BaseListPaused
$criteria->add(ListPausedPeer::APP_UID, $search, Criteria::EQUAL);
} else {
//If we have additional tables configured in the custom cases list, prepare the variables for search
$casesList = new \ProcessMaker\BusinessModel\Cases();
$casesList->getSearchCriteriaListCases($criteria, __CLASS__ . 'Peer', $search, $this->additionalClassName, $additionalColumns);
$casesList = new BmCases();
$casesList->getSearchCriteriaListCases(
$criteria,
__CLASS__ . 'Peer',
$search,
$this->getAdditionalClassName(),
$additionalColumns
);
}
}
@@ -270,7 +322,7 @@ class ListPaused extends BaseListPaused
* This function get the information in the corresponding cases list
* @param string $usr_uid, must be show cases related to this user
* @param array $filters for apply in the result
* @param null $callbackRecord
* @param callable $callbackRecord
* @return array $data
* @throws PropelException
*/
@@ -279,7 +331,7 @@ class ListPaused extends BaseListPaused
$resp = array();
$pmTable = new PmTable();
$criteria = $pmTable->addPMFieldsToList('paused');
$this->additionalClassName = $pmTable->tableClassName;
$this->setAdditionalClassName($pmTable->tableClassName);
$additionalColumns = $criteria->getSelectColumns();
$criteria->addSelectColumn(ListPausedPeer::APP_UID);
@@ -308,14 +360,15 @@ class ListPaused extends BaseListPaused
self::loadFilters($criteria, $filters, $additionalColumns);
//We will be defined the sort
$casesList = new \ProcessMaker\BusinessModel\Cases();
$casesList = new BmCases();
$sort = $casesList->getSortColumn(
__CLASS__ . 'Peer',
BasePeer::TYPE_FIELDNAME,
empty($filters['sort']) ? "APP_PAUSED_DATE" : $filters['sort'],
"APP_PAUSED_DATE",
$this->additionalClassName,
$additionalColumns
$this->getAdditionalClassName(),
$additionalColumns,
$this->getUserDisplayFormat()
);
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";