PMCORE-980
This commit is contained in:
26
workflow/engine/src/ProcessMaker/Model/SubProcess.php
Normal file
26
workflow/engine/src/ProcessMaker/Model/SubProcess.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use ProcessMaker\Model\Application;
|
||||
|
||||
class SubProcess extends Model
|
||||
{
|
||||
protected $table = 'SUB_PROCESS';
|
||||
protected $primaryKey = 'SP_UID';
|
||||
// We do not have create/update timestamps for this table
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Get he Process parents of a subprocess
|
||||
*
|
||||
* @param string $proUid
|
||||
* @return array
|
||||
*/
|
||||
public static function getProParents($proUid)
|
||||
{
|
||||
$query = SubProcess::select('PRO_PARENT', 'TAS_PARENT')->where('PRO_UID', $proUid);
|
||||
return $query->get()->values()->toArray();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user