Refactoring Bpmn/Workflow handling layer (4th commit) - adding unit test for BpmnActivity class that is handling transparently its Bound object
This commit is contained in:
@@ -17,16 +17,18 @@ require_once 'classes/model/om/BaseBpmnBound.php';
|
||||
class BpmnBound extends BaseBpmnBound
|
||||
{
|
||||
public static function findOneBy($field, $value)
|
||||
{
|
||||
$rows = self::findAllBy($field, $value);
|
||||
|
||||
return empty($rows) ? null : $rows[0];
|
||||
}
|
||||
|
||||
public static function findAllBy($field, $value)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->add($field, $value, Criteria::EQUAL);
|
||||
|
||||
$c->add($field, $value, CRITERIA::EQUAL );
|
||||
|
||||
$rs = ContentPeer::doSelectRS($c);
|
||||
//$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
return $rs->getRow();
|
||||
return BpmnBoundPeer::doSelect($c);
|
||||
}
|
||||
|
||||
public static function findByElement($type, $uid)
|
||||
|
||||
Reference in New Issue
Block a user