class UpdateSyncedResource extends QueueableListener (View source)

Properties

static bool $shouldQueue

Methods

bool
shouldQueue(object $event)

No description

void
handle(object $event)

No description

getTenantsForCentralModel(Syncable $centralModel)

No description

void
updateResourceInTenantDatabases(TenantCollection $tenants, SyncedResourceSaved $event, array $syncedAttributes)

No description

array
getAttributesForCreation(Model&Syncable $model)

No description

array
getAttributeNamesAndDefaultValues(Model&Syncable $model)

Split the attribute names (sequential index items) and default values (key => values).

Details

bool shouldQueue(object $event)

No description

Parameters

object $event

Return Value

bool

void handle(object $event)

No description

Parameters

object $event

Return Value

void

protected TenantCollection getTenantsForCentralModel(Syncable $centralModel)

No description

Parameters

Syncable $centralModel

Return Value

TenantCollection

protected TenantCollection updateResourceInCentralDatabaseAndGetTenants(SyncedResourceSaved $event, array $syncedAttributes)

No description

Parameters

SyncedResourceSaved $event
array $syncedAttributes

Return Value

TenantCollection

protected void updateResourceInTenantDatabases(TenantCollection $tenants, SyncedResourceSaved $event, array $syncedAttributes)

No description

Parameters

TenantCollection $tenants
SyncedResourceSaved $event
array $syncedAttributes

Return Value

void

protected array getAttributesForCreation(Model&Syncable $model)

No description

Parameters

Model&Syncable $model

Return Value

array

protected array getAttributeNamesAndDefaultValues(Model&Syncable $model)

Split the attribute names (sequential index items) and default values (key => values).

Parameters

Model&Syncable $model

Return Value

array