Class LaravelUi5\Core\Attributes\SemanticObject

Declares the primary semantic object represented by a Ui5Module.

A semantic object is the logical entry point of a module — describing which business entity this module "owns" (e.g. BusinessPartner, Project, Invoice) and how other modules or the UI can reach it via named navigation intents.

Each Ui5Module must declare exactly one SemanticObject.

Purpose

This attribute enables:

  • automatic cross-module linking via {@see SemanticLink}
  • semantic intent navigation in the UI
  • backend reflection and registry consistency

Example

use LaravelUi5\Core\Attributes\SemanticObject;

#[SemanticObject(
    model: \Pragmatiqu\Partners\Models\Partner::class,
    name:  'BusinessPartner',
    routes: [
        'detail' => [
            'uri'   => '/Detail/{id}',
            'label' => 'Partner Details',
            'icon'  => 'sap-icon://person-placeholder',
        ],
        'roles' => [
            'uri'   => '/Roles?partner_id={id}',
            'label' => 'Assigned Roles',
            'icon'  => 'sap-icon://role',
        ],
    ],
    icon: 'sap-icon://group'
)]
class PartnersModule extends Ui5Module {}

Parameters

Methods
Properties