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\Menu\Domain\Repository; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Modules\Menu\Domain\Model\MenuItem; |
| 12 | |
| 13 | /** |
| 14 | * Menu Repository Contract Interface. |
| 15 | * |
| 16 | * Decouples domain logic from specific SQL database persistence implementation for menu items. |
| 17 | * |
| 18 | * @package App\Modules\Menu\Domain\Repository |
| 19 | */ |
| 20 | interface MenuRepositoryInterface |
| 21 | { |
| 22 | /** |
| 23 | * Fetches all active root menu items as a nested tree hierarchy array. |
| 24 | * |
| 25 | * @param string|null $profile Optional application profile ('admin' or 'client'). |
| 26 | * @return array<int, MenuItem> Root menu items with populated children. |
| 27 | */ |
| 28 | public function getActiveMenuTree(?string $profile = null): array; |
| 29 | } |