* Query and return the references pointing to the given entity.
* Loads the commonly required relations while taking permissions into account.
*/
- public function getReferencesToEntity(Entity $entity): Collection
+ public function getReferencesToEntity(Entity $entity, bool $withContents = false): Collection
{
$references = $this->queryReferencesToEntity($entity)->get();
- $this->mixedEntityListLoader->loadIntoRelations($references->all(), 'from', true);
+ $this->mixedEntityListLoader->loadIntoRelations($references->all(), 'from', false, $withContents);
return $references;
}