CR
This commit is contained in:
Fabio Guachalla
2020-06-08 17:25:28 -04:00
parent 1e508a2450
commit 557f3634e5
5 changed files with 14 additions and 13 deletions

View File

@@ -375,8 +375,7 @@ class Variable
* @param string $search
* @param string $prefix
*
* @return array, return an array with data of a DynaForm
* @throws Exception
* @return array, return an array with varaibles filter by type
*/
public function getVariablesByType($processUid, $typeVarId = 0, $start = null, $limit = null, $search = null, $prefix = null)
{

View File

@@ -76,7 +76,7 @@ class ProcessVariables extends Model
}
/**
* Scope a query to filter an specific type for variable
* Scope a query to filter a specific type for variable
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param int $typeId
@@ -136,7 +136,7 @@ class ProcessVariables extends Model
if (!empty($search)) {
$query->where('VAR_NAME', 'LIKE', "${search}%");
}
// orde by varNane
// order by varNane
$query->orderBy('VAR_NAME', 'ASC');
// Check if we need to add a pagination
if(!is_null($start) && !is_null($limit)) {

View File

@@ -3,9 +3,9 @@ namespace ProcessMaker\Services\Api\Project;
use Exception;
use G;
use Luracast\Restler\RestException;
use ProcessMaker\BusinessModel\Variable as BmVariable;
use ProcessMaker\Services\Api;
use Luracast\Restler\RestException;
/**
* Project\Variable Api Controller
@@ -33,6 +33,8 @@ class Variable extends Api
}
/**
* Get variables by type
*
* @url GET /:prj_uid/process-variables/:typeVariable/paged
*
* @param string $prj_uid {@min 32}{@max 32}