N°5221 - DG Form: display related URs without the scope and its flag <ignore_silo>

This commit is contained in:
Anne-Cath
2025-11-27 12:00:22 +01:00
parent 03e25a226e
commit cf1eb4da61
3 changed files with 23 additions and 2 deletions

View File

@@ -52,6 +52,8 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
*/
protected $bHasDelta = false;
protected $bAllowAllData = false;
/**
* Object from the original set, minus the removed objects
* @var DBObject[] array of iObjectId => DBObject
@@ -118,6 +120,11 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
return clone $this->oOriginalSet->GetFilter();
}
public function AllowAllData(): void
{
$this->bAllowAllData = true;
}
/**
* Specify the subset of attributes to load (for each class of objects) before performing the SQL query for retrieving the rows from the DB
*
@@ -309,6 +316,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
return $ret;
}
/**
* Return the current element
*
@@ -329,7 +337,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
$iPreservedCount = count($this->aPreserved);
if ($this->iCursor < $iPreservedCount) {
$sId = key($this->aPreserved);
$oRet = MetaModel::GetObject($this->sClass, $sId);
$oRet = MetaModel::GetObject($this->sClass, $sId, true, $this->bAllowAllData);
} else {
$iModifiedCount = count($this->aModified);
if ($this->iCursor < $iPreservedCount + $iModifiedCount) {