| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Ui5\Contracts; |
| 4: | |
| 5: | /** |
| 6: | * A discoverable UI5 Report Artifact that includes selection, result, and optional actions. |
| 7: | * |
| 8: | * This interface defines the required contract for a report to be integrated into the |
| 9: | * UI5 Admin Panel and executed via the central ReportController. |
| 10: | * |
| 11: | * Each report artifact provides: |
| 12: | * - A JavaScript namespace (used in UI5 client) |
| 13: | * - A semantic version for cache busting |
| 14: | * - Title, description, and a unique urlKey |
| 15: | * - Access to the data provider logic |
| 16: | * - View templates for selection and report output |
| 17: | * - Optionally: follow-up actions |
| 18: | */ |
| 19: | interface Ui5ReportInterface extends Ui5ArtifactInterface, SluggableInterface |
| 20: | { |
| 21: | /** |
| 22: | * Returns the class that handles data retrieval and export logic. |
| 23: | */ |
| 24: | public function getProvider(): DataProviderInterface; |
| 25: | |
| 26: | /** |
| 27: | * Returns the path to the UI5 selection view Blade template. |
| 28: | */ |
| 29: | public function getSelectionViewPath(): string; |
| 30: | |
| 31: | /** |
| 32: | * Returns the path to the UI5 report result view Blade template. |
| 33: | */ |
| 34: | public function getSelectionControllerPath(): string; |
| 35: | |
| 36: | /** |
| 37: | * Returns the path to the Laravel Blade view used to render the final report output. |
| 38: | * |
| 39: | * This view receives the result from the DataProvider as `$data`, |
| 40: | * and can render tables, charts, summaries or any other layout. |
| 41: | */ |
| 42: | public function getReportView(): string; |
| 43: | |
| 44: | /** |
| 45: | * Returns a list of available follow-up actions. |
| 46: | * |
| 47: | * @return array<string, ReportActionInterface> e.g. ['discard' => new Ui5AnnualCutOffCommitAction()] |
| 48: | */ |
| 49: | public function getActions(): array; |
| 50: | } |
| 51: |