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\Core\Grid\Widget\Application;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Core\Engine\Domain\Model\FieldMetadata;
12use App\Core\Engine\Domain\Model\PermissionContext;
13
14/**
15 * Widget List Query Service Interface.
16 *
17 * Contract for fetching records and column metadata for mini-list grid widgets.
18 *
19 * @package App\Core\Grid\Widget\Application
20 */
21interface WidgetListQueryServiceInterface
22{
23    /**
24     * Executes query and returns records with metadata for widget list rendering.
25     *
26     * @param array<string, mixed> $params  Widget parameters.
27     * @param PermissionContext   $context Security context.
28     * @return array{
29     *     records: list<array<string, mixed>>,
30     *     total: int,
31     *     columns: list<FieldMetadata>,
32     *     module_name: string,
33     *     route_url: string
34     * }
35     */
36    public function fetchListWidgetData(array $params, PermissionContext $context): array;
37}