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\Core\Action\Domain\Repository; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Core\Action\Domain\Model\ActionMetadata; |
| 12 | |
| 13 | /** |
| 14 | * Action Repository Interface. |
| 15 | * |
| 16 | * Defines contracts for querying and managing system action metadata. |
| 17 | * |
| 18 | * @package App\Core\Action\Domain\Repository |
| 19 | */ |
| 20 | interface ActionRepositoryInterface |
| 21 | { |
| 22 | /** |
| 23 | * Retrieves all active actions for a specific category and optional module. |
| 24 | * |
| 25 | * @param string $category Action category (e.g. grid_bulk, grid_toolbar, record_row). |
| 26 | * @param int|null $moduleId Optional module ID filter. |
| 27 | * @return array<int, ActionMetadata> List of action metadata objects sorted by sort_order. |
| 28 | */ |
| 29 | public function findByCategory(string $category, ?int $moduleId = null): array; |
| 30 | |
| 31 | /** |
| 32 | * Finds a single action by machine name and optional module. |
| 33 | * |
| 34 | * @param string $name Action unique name. |
| 35 | * @param int|null $moduleId Optional module ID filter. |
| 36 | * @return ActionMetadata|null Action metadata or null if not found. |
| 37 | */ |
| 38 | public function findByName(string $name, ?int $moduleId = null): ?ActionMetadata; |
| 39 | } |