A Ui5Module represents the root-level container for all UI5-related artifacts
provided by a feature package or domain module in the LaravelUi5 ecosystem.
A module can contain either a UI5 application or a UI5 library, but not both.
Only applications can provide subordinate artifacts such as cards, actions,
reports, KPIs, and tiles.
Responsibilities:
- Expose the main artifact (App or Library) via type-specific getters
- Declare all subordinate artifacts (if applicable)
- Provide artifact metadata via Ui5ArtifactInterface
System rules:
- A module MUST provide either an app or a library (exclusive)
- A library MUST NOT define subordinate artifacts
- Every artifact must have a globally unique namespace
| Methods |
public
|
getNamespace(): string
Returns the canonical namespace of the module — the dotted token
(e.g. `io.pragmatiqu.portal`) that uniquely identifies…
Returns the canonical namespace of the module — the dotted token
(e.g. io.pragmatiqu.portal) that uniquely identifies it within the
installation. It is the registry key and the basis for URL/route
construction (dots → slashes), manifest generation, and module mapping.
Single source of truth. A module is a container, not an artifact —
it does not own its namespace, it reflects its root artifact's. The
abstract base derives this from getArtifactRoot()->getNamespace(), so
the module and its App/Library can never drift. (Rootless test doubles
may override with a literal.)
Returns
Implemented by
|
#
|
public
|
requiresAuth(): bool
Indicates whether this module requires an authenticated user
in order to be served.
Indicates whether this module requires an authenticated user
in order to be served.
Returning true means the module is only accessible to
authenticated users. Public modules should return false.
Implemented by
|
#
|
public
|
getSourceStrategy(): Ui5SourceStrategyInterface
Returns the Ui5SourceStrategy used to resolve UI5 source artifacts
for this module.
Returns the Ui5SourceStrategy used to resolve UI5 source artifacts
for this module.
The source strategy defines how and from where UI5 resources
(manifest, preload bundles, i18n files, descriptors) are accessed,
depending on the module's origin (e.g. workspace-based or packaged).
The returned value is resolved by the Ui5Registry.
The strategy itself is responsible for:
- determining the runtime UI5 resource path,
- and optionally providing introspection capabilities.
Important:
- This method does NOT perform any filesystem access.
- It only declares which strategy applies to this module.
Returns
Strategy for resolving Ui5Source artifacts.
Implemented by
|
#
|
public
|
hasApp(): bool
Returns true if this module provides a UI5 application.
Returns true if this module provides a UI5 application.
Implemented by
|
#
|
public
|
getApp(): Ui5AppInterface|null
Returns the application artifact, if present.
Returns the application artifact, if present.
Implemented by
|
#
|
public
|
hasLibrary(): bool
Returns true if this module provides a UI5 library.
Returns true if this module provides a UI5 library.
Implemented by
|
#
|
public
|
getLibrary(): Ui5LibraryInterface|null
Returns the library artifact, if present.
Returns the library artifact, if present.
Implemented by
|
#
|
public
|
getArtifactRoot(): Ui5AppInterface|Ui5LibraryInterface
Returns the root artifact of the module — either the application or the library,
depending on the module type.
Returns the root artifact of the module — either the application or the library,
depending on the module type.
This method allows consumers to access the primary artifact in a generic way,
without checking whether the module is app- or library-based.
Returns
The root artifact (App or Library)
Implemented by
|
#
|
public
|
getCards(): Ui5CardInterface[]
Returns an array of all cards provided by this module.
Only available if this module provides an app.
Returns an array of all cards provided by this module.
Only available if this module provides an app.
|
#
|
public
|
getTiles(): Ui5TileInterface[]
Returns an array of all tiles for launchpad or navigation purposes.
Returns an array of all tiles for launchpad or navigation purposes.
|
#
|
public
|
getCharts(): Ui5ChartInterface[]
Returns an array of all charts provided by this module.
Returns an array of all charts provided by this module.
Charts are embedded primitives like tiles — listed alongside tiles
and cards in a Dashboard Group's getChildNamespaces(). The
default {@see \LaravelUi5\Core\Ui5\AbstractUi5Module} implementation
returns [] so existing modules that predate the Chart artifact
type continue to satisfy the contract without modification.
Implemented by
|
#
|
public
|
getActions(): Ui5ActionInterface[]
Returns an array of all actions (API endpoints) provided by this module.
Returns an array of all actions (API endpoints) provided by this module.
|
#
|
public
|
getResources(): Ui5ResourceInterface[]
Returns an array of all resources (API) provided by this module.
Returns an array of all resources (API) provided by this module.
|
#
|
public
|
getDashboards(): Ui5DashboardInterface[]
Returns an array of all dashboards provided by this module.
Returns an array of all dashboards provided by this module.
Not discovered automatically: returning a dashboard from this method is
what registers it. No configuration key is read.
|
#
|
public
|
getReports(): Ui5ReportInterface[]
Returns an array of all reports provided by this module.
Returns an array of all reports provided by this module.
Not discovered automatically: returning a report from this method is
what registers it. No configuration key is read.
|
#
|
public
|
getDialogs(): Ui5DialogInterface[]
Returns an array of all dialogs provided by this module.
Returns an array of all dialogs provided by this module.
Not discovered automatically: returning a dialog from this method is
what registers it. No configuration key is read.
|
#
|
public
|
getValueHelps(): Ui5ValueHelpInterface[]
Returns an array of all value helps provided by this module.
Returns an array of all value helps provided by this module.
A value help is a Dialog subtype (ArtifactType::ValueHelp) that returns
a selection — the successor of the global Dialog (LUX Weave Facet D). Like
dialogs it is not discovered automatically; declare it via getValueHelps().
The default {@see \LaravelUi5\Core\Ui5\AbstractUi5Module} implementation
returns [] so modules that predate the ValueHelp artifact type continue
to satisfy the contract without modification.
Implemented by
|
#
|
public
|
getAllArtifacts(): Ui5ArtifactInterface[]
Returns all artifacts belonging to this module (app, library, tiles, cards,
kpis, actions, resources, dashboards,…
Returns all artifacts belonging to this module (app, library, tiles, cards,
kpis, actions, resources, dashboards, reports, dialogs, etc.)
Implemented by
|
#
|