37 lines
775 B
PHP
37 lines
775 B
PHP
<?php
|
|
|
|
namespace App\Element;
|
|
|
|
use App\Set\Set as DomainSet;
|
|
|
|
interface ElementRepository
|
|
{
|
|
public function create(CreateElementDto $dto): Element;
|
|
|
|
public function update(Element $element): Element;
|
|
|
|
public function delete(Element $element): void;
|
|
|
|
public function find(int $id): ?Element;
|
|
|
|
public function findRootBySet(DomainSet $set): ?Element;
|
|
|
|
/**
|
|
* @return Element[]
|
|
*/
|
|
public function findBySet(DomainSet $set): array;
|
|
|
|
/**
|
|
* @return Element[]
|
|
*/
|
|
public function findByParentElement(Element $parentElement): array;
|
|
|
|
/**
|
|
* @param int[] $childElementIds
|
|
* @return Element[]
|
|
*/
|
|
public function reorderChildren(
|
|
Element $parentElement,
|
|
array $childElementIds,
|
|
): array;
|
|
}
|