\Drupal\strata\Event HealthEvent

A tripwire recorded a finding.

Carries the finding rather than a summary of it, so a subscriber can route on severity and code without re-reading the ledger.

Summary

Methods
Properties
Constants
__construct
name
needsAttention
jsonSerialize
finding
rung
No public constants found
body
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$finding

$finding : \Drupal\strata\Health\Finding

Type

Finding

$rung

$rung : string

Type

string

Methods

__construct()

__construct(\Drupal\strata\Health\Finding  $finding, string  $rung = 'observe') : mixed

Constructs an event.

Parameters

\Drupal\strata\Health\Finding $finding

What was found.

string $rung

The repair rung the ladder puts this code on.

Returns

mixed —

name()

name() : string

The name this event is dispatched under.

Returns

string —

One of the constants on StrataEvents.

needsAttention()

needsAttention() : bool

Whether this finding is one a human has to act on.

Returns

bool —

TRUE at ERROR and above.

jsonSerialize()

jsonSerialize() : array<string,mixed>

The payload a webhook sends and a log line records.

Returns

array

The event name, the site, the moment, and the body.

body()

body() : array<string,mixed>

What happened, as data.

Returns

array

The body, without the envelope.