Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Modules\Structure\Application\Service;
8
9defined('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 */
16interface 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}