Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Modules\Structure\Application\Service; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Structure Tree Builder Contract Interface. |
| 13 | * |
| 14 | * @package App\Modules\Structure\Application\Service |
| 15 | */ |
| 16 | interface StructureTreeBuilderInterface |
| 17 | { |
| 18 | /** |
| 19 | * Builds full active organizational structure hierarchy tree. |
| 20 | * |
| 21 | * @return array<int, array<string, mixed>> Tree array representation. |
| 22 | */ |
| 23 | public function buildTree(): array; |
| 24 | |
| 25 | /** |
| 26 | * Builds flat list with depth indentation for dropdown selects. |
| 27 | * |
| 28 | * @param int|null $excludeId Optional node ID to exclude (e.g. self when moving parent). |
| 29 | * @return array<int, array{id: int, label: string, depth: int, disabled: bool, users_count: int}> |
| 30 | */ |
| 31 | public function buildFlattenedTreeForSelect(?int $excludeId = null): array; |
| 32 | } |