Skip to content

Commit

Permalink
Profile assignment twig migration
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 authored Jan 22, 2024
1 parent 92d806c commit 1f858cb
Show file tree
Hide file tree
Showing 5 changed files with 536 additions and 453 deletions.
16 changes: 12 additions & 4 deletions src/CommonDBRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -1903,18 +1903,26 @@ protected static function getListForItemParams(CommonDBTM $item, $noent = false)
* @since 9.3.1
*
* @param CommonDBTM $item Item instance
* @param integer $start Start index
* @param integer $limit Limit of results. If 0, no limit.
* @param array $order The order for the results where the first element is the column name that will be sorted and the second element is the direction of the sorting (ASC or DESC)
*
* @return DBmysqlIterator
*/
public static function getListForItem(CommonDBTM $item)
public static function getListForItem(CommonDBTM $item, int $start = 0, int $limit = 0, array $order = [])
{
/** @var \DBmysql $DB */
global $DB;

$params = static::getListForItemParams($item);
$iterator = $DB->request($params);

return $iterator;
$params['START'] = $start;
if ($limit > 0) {
$params['LIMIT'] = $limit;
}
if (!empty($order)) {
$params['ORDER'] = $order;
}
return $DB->request($params);
}

/**
Expand Down
Loading

0 comments on commit 1f858cb

Please sign in to comment.