final |
|---|
readonly |
One finding of a rule: a subject that needs a person's attention, and who that person is.
The addressee is a role — SdkRole::…, FoundationRole::… or your module's token —, optionally one partner, and,
for a role scoped to a model (#[Role(…, scope: Model::class)]), the model the role is held on: pass the model, the
SDK derives its morph key. The text and the fix are your free text, in the tenant's base language. The action is the
intent that opens the subject in the app that owns it.
new WorkItemFinding(
subject: "co_object:{$object->code}",
role: FoundationRole::ProjectManager,
text: "Projekt {$object->code}: kein Tarif für Beratung.",
fix: 'Den Tarif in der Controlling-App anlegen.',
context: $object,
);
| Methods | ||
|---|---|---|
public
|
__construct(
string $subject,
BackedEnum|string $role,
string $text,
?string $fix = null,
WorkItemSeverity $severity = WorkItemSeverity::Action,
?Model $context = null,
?Partner $partner = null,
array<string, mixed>|null $action = null,
)
|
# |
public
|
roleToken(): string
|
# |
| Properties | |||
|---|---|---|---|
public
|
string
|
$subject
|
# |
public
|
BackedEnum|string
|
$role
|
# |
public
|
string
|
$text
|
# |
public
|
?string
|
$fix
|
# |
public
|
WorkItemSeverity
|
$severity
|
# |
public
|
?Model
|
$context
|
# |
public
|
?Partner
|
$partner
|
# |
public
|
array<string, mixed>|null
|
$action
|
# |