HOR-4075
Define Interface for List classes. Implement a trait base for the lists. Fix sort by current user at Review and Reassign lists.
This commit is contained in:
@@ -15,8 +15,10 @@ require_once 'classes/model/om/BaseListCanceled.php';
|
||||
* @package classes.model
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
class ListCanceled extends BaseListCanceled
|
||||
class ListCanceled extends BaseListCanceled implements ListInterface
|
||||
{
|
||||
use ListBaseTrait;
|
||||
|
||||
// @codingStandardsIgnoreEnd
|
||||
/**
|
||||
* Create List Canceled Table
|
||||
@@ -283,7 +285,7 @@ class ListCanceled extends BaseListCanceled
|
||||
}
|
||||
}
|
||||
|
||||
public function loadList($usr_uid, $filters = array(), $callbackRecord = null)
|
||||
public function loadList($usr_uid, $filters = array(), callable $callbackRecord = null)
|
||||
{
|
||||
$resp = array();
|
||||
$criteria = new Criteria();
|
||||
@@ -346,16 +348,7 @@ class ListCanceled extends BaseListCanceled
|
||||
*/
|
||||
public function getCountList($usrUid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn('COUNT(*) AS TOTAL');
|
||||
$criteria->add(ListCanceledPeer::USR_UID, $usrUid, Criteria::EQUAL);
|
||||
if (count($filters)) {
|
||||
self::loadFilters($criteria, $filters);
|
||||
}
|
||||
$dataset = ListCanceledPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
return (int)$aRow['TOTAL'];
|
||||
return $this->getCountListFromPeer
|
||||
(ListCanceledPeer::class, $usrUid, $filters);
|
||||
}
|
||||
} // ListCanceled
|
||||
|
||||
Reference in New Issue
Block a user