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\Grid\Widget\Application; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Core\Engine\Domain\Model\PermissionContext; |
| 12 | |
| 13 | /** |
| 14 | * Widget Aggregation Data Service Interface. |
| 15 | * |
| 16 | * Contract for computing Chart.js aggregated datasets from analytical module data. |
| 17 | * |
| 18 | * @package App\Core\Grid\Widget\Application |
| 19 | */ |
| 20 | interface WidgetAggregationDataServiceInterface |
| 21 | { |
| 22 | /** |
| 23 | * Computes Chart.js compatible aggregated data structure for a given widget configuration. |
| 24 | * |
| 25 | * @param array<string, mixed> $params Widget parameters JSON array. |
| 26 | * @param PermissionContext $context Current actor security context. |
| 27 | * @return array{labels: list<string>, datasets: list<array<string, mixed>>} Chart.js data object. |
| 28 | */ |
| 29 | public function computeChartData(array $params, PermissionContext $context): array; |
| 30 | } |