new: [API rearrange] added a simplifier for commonly used objects
- let's only return the subset of the data required to identify and retrieve the related datacli-modification-summary
parent
540fd63423
commit
003053f13d
|
@ -99,4 +99,22 @@ class AppModel extends Entity
|
||||||
}
|
}
|
||||||
return $rearrangedAlignments;
|
return $rearrangedAlignments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function rearrangeSimplify(array $typesToRearrange): void
|
||||||
|
{
|
||||||
|
if (in_array('organisation', $typesToRearrange) && isset($this->organisation)) {
|
||||||
|
$this->organisation = [
|
||||||
|
'id' => $this->organisation['id'],
|
||||||
|
'name' => $this->organisation['name'],
|
||||||
|
'uuid' => $this->organisation['uuid']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
if (in_array('individual', $typesToRearrange) && isset($this->individual)) {
|
||||||
|
$this->individual = [
|
||||||
|
'id' => $this->individual['id'],
|
||||||
|
'email' => $this->individual['email'],
|
||||||
|
'uuid' => $this->individual['uuid']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue