\Drupal\strata\Event RestoreEvent

A restore finished.

Dispatched whatever the outcome, including a refusal, because a refused rollback is the case an operator most needs to hear about and the one a success-only channel would swallow.

Summary

Methods
Properties
Constants
__construct
name
isFailure
jsonSerialize
result
mode
scope
actor
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

$result

$result : \Drupal\strata\Restore\RestoreResult

Type

RestoreResult

$mode

$mode : string

Type

string

$scope

$scope : string

Type

string

$actor

$actor : ?int

Type

int|null

Methods

__construct()

__construct(\Drupal\strata\Restore\RestoreResult  $result, string  $mode = 'logical', string  $scope = '', int|null  $actor = null) : mixed

Constructs an event.

Parameters

\Drupal\strata\Restore\RestoreResult $result

What the restore did.

string $mode

Either "logical" or "physical".

string $scope

The scope that was asked for.

int|null $actor

The account that ran it, or NULL for a command line run.

Returns

mixed —

name()

name() : string

The name this event is dispatched under.

Returns

string —

One of the constants on StrataEvents.

isFailure()

isFailure() : bool

Whether this restore is one an operator should be paged about.

Returns

bool —

TRUE when it was refused, or wrote nothing it was asked to write.

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.