| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Ui5\Contracts; |
| 4: | |
| 5: | use LaravelUi5\Core\Ui5\Capabilities\DataProviderInterface; |
| 6: | |
| 7: | /** |
| 8: | * Contract for UI5 Card artifacts. |
| 9: | * |
| 10: | * A Card is a lightweight, embeddable UI element that typically displays |
| 11: | * summary or entry-point information (e.g. KPIs, recent items, small lists). |
| 12: | * It is backed by a {@see DataProviderInterface}, which encapsulates the |
| 13: | * domain logic and delivers the structured data required for rendering. |
| 14: | * |
| 15: | * Responsibilities: |
| 16: | * - Declares the association between the Card artifact and its provider. |
| 17: | * - Acts as a discoverable artifact within the {@see Ui5RegistryInterface}. |
| 18: | * |
| 19: | * Cards are read-only artifacts: they must not change application state. |
| 20: | */ |
| 21: | interface Ui5CardInterface extends Ui5ArtifactInterface |
| 22: | { |
| 23: | /** |
| 24: | * Returns the class name or instance of the associated DataProvider. |
| 25: | * |
| 26: | * The provider is responsible for delivering the `card.content.data` |
| 27: | * structure as defined in the card manifest. |
| 28: | * |
| 29: | * @return DataProviderInterface |
| 30: | */ |
| 31: | public function getProvider(): DataProviderInterface; |
| 32: | |
| 33: | /** |
| 34: | * Returns the realized manifest.json Blade component as string. |
| 35: | * |
| 36: | * @return string |
| 37: | */ |
| 38: | public function getManifest(): string; |
| 39: | } |
| 40: |