add set layout api
This commit is contained in:
parent
eb7ac7d261
commit
4222d4c0a2
16 changed files with 487 additions and 6 deletions
|
|
@ -39,6 +39,20 @@ class FakeElementRepository implements ElementRepository
|
|||
return $element === null ? null : $this->copy($element);
|
||||
}
|
||||
|
||||
public function findBySet(Set $set): array
|
||||
{
|
||||
$elements = array_filter(
|
||||
$this->elements,
|
||||
function (Element $element) use ($set): bool {
|
||||
return $element->getSet()->getId() === $set->getId();
|
||||
},
|
||||
);
|
||||
|
||||
return array_map(function (Element $element): Element {
|
||||
return $this->copy($element);
|
||||
}, array_values($elements));
|
||||
}
|
||||
|
||||
public function findTopLevelBySet(Set $set): array
|
||||
{
|
||||
$elements = array_filter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue