Represents the semantic result of handling an intent.
Mental model:
"This is what should happen next."
An IntentResult does NOT describe UI implementation details,
only the next semantic step. The {@see $type} is a closed
{@see IntentResultType} vocabulary; it serializes to its string value on
the wire (response()->json() → {"type":"redirect", …}). One type per client behaviour:
the LeanShell has exactly one arm for each.
| Methods |
public
|
__construct(IntentResultType $type, array $payload = [])
|
#
|
public
static
|
dialog(string $app, string $dialogView): self
Indicates a global dialog should be opened in the shell. The client's
DialogAdapter consumes `{app, dialogView}` and…
Indicates a global dialog should be opened in the shell. The client's
DialogAdapter consumes {app, dialogView} and opens the sap.m.Dialog-rooted
view (own app or, for a foreign app, by creating its Component).
Parameters
| $app |
Owning app namespace (dotted, e.g. com.laravelui5.partners).
|
| $dialogView |
View name in slash-module form
(e.g. com/laravelui5/partners/view/dialogs/CreateCompany).
|
|
#
|
public
static
|
valueHelp(string $app, string $view, string $entitySet): self
Indicates a value help picker should be opened in the shell. The client's
`openValueHelp` consumes `{app, view}`, hosts…
Indicates a value help picker should be opened in the shell. The client's
openValueHelp consumes {app, view}, hosts the sap.m.Dialog-rooted
picker (own app or, for a foreign app, by creating its Component), and
brokers the confirmed [{key,text,data?}] selection back through the
caller's promise — distinct from the dialog arm, which is fire-and-forget.
Parameters
| $app |
Owning app namespace (dotted, e.g. com.laravelui5.partners).
|
| $view |
Picker view name in slash-module form
(e.g. com/laravelui5/partners/view/valuehelp/Partners).
|
| $entitySet |
The first-class OData entity set the picker view binds — the
resolved scope. Mandatory: there are
no empty scopes, so a value-help open always resolves a
scope to exactly one server-authorized set. The client's
BaseValueHelp controller binds it unconditionally.
|
|
#
|
public
static
|
dispatch(IntentInterface $intent): self
Indicates that another intent should be dispatched.
Indicates that another intent should be dispatched.
Mental model:
"This intent prepares the ground for another one."
|
#
|
public
static
|
redirect(string $url): self
Indicates a full context reset is required.
Indicates a full context reset is required.
|
#
|
public
static
|
message(string $level, MessageText $text): self
Indicates an informational or error message. The text is a key in a module's bundle
(`MessageText::of(…)->from(App:…
Indicates an informational or error message. The text is a key in a module's bundle
(MessageText::of(…)->from(App::NAMESPACE); without from(), Core's, which holds the SDK's own texts),
resolved in the request's language before the response leaves
{@see \LaravelUi5\Sdk\Http\Controllers\IntentDispatchController}.
|
#
|
public
static
|
deny(MessageText $reason): self
Indicates the intent was denied. The reason is a key, resolved like {@see message()}'s text.
Indicates the intent was denied. The reason is a key, resolved like {@see message()}'s text.
|
#
|
public
|
resolved(Texts $texts): self
This result with its texts resolved — what goes on the wire: a `reason` or `text` is finished text, as the
client has…
This result with its texts resolved — what goes on the wire: a reason or text is finished text, as the
client has always read it.
|
#
|