Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile assignment twig migration #16360

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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