trait has_status

Trait has_status.

Provides helper methods to check status state against the Enum. Removes hardcoded constants in favor of local_middag\framework\shared\enum\status.

Properties

string $status

Expected property on the using class.

Methods

bool
is_status(item_status|string $value)

Check if the current status matches a specific value or Enum case.

bool
is_draft()

Determine if the item is in draft state.

bool
is_published()

Determine if the item is published.

bool
is_archived()

Determine if the item is archived.

bool
is_deleted()

Determine if the item is marked as deleted.

bool
is_active()

Check if the item is active.

bool
is_inactive()

Check if the item is inactive.

bool
is_enabled()

Check if the item is enabled.

bool
is_disabled()

Check if the item is disabled.

bool
is_pending()

Check if the item awaits processing.

bool
is_approved()

Check if the item is approved.

bool
is_rejected()

Check if the item was rejected.

bool
is_not_started()

Check if the item has not started.

bool
is_in_progress()

Check if the item is in progress.

bool
is_completed()

Check if the item is completed.

bool
is_failed()

Check if the item has failed.

bool
is_expired()

Check if the item is expired.

bool
is_canceled()

Check if the item is canceled.

bool
is_paused()

Check if the item is paused.

bool
is_queued()

Check if the item is queued.

bool
is_running()

Check if the item is running.

bool
is_syncing()

Check if the item is syncing.

bool
is_synced()

Check if the item finished syncing.

bool
is_error()

Check if the item is in an error state.

Details

at line 39
bool is_status(item_status|string $value)

Check if the current status matches a specific value or Enum case.

Parameters

item_status|string $value

Return Value

bool

at line 61
bool is_draft()

Determine if the item is in draft state.

Return Value

bool

at line 69
bool is_published()

Determine if the item is published.

Return Value

bool

at line 77
bool is_archived()

Determine if the item is archived.

Return Value

bool

at line 85
bool is_deleted()

Determine if the item is marked as deleted.

Return Value

bool

at line 97
bool is_active()

Check if the item is active.

Return Value

bool

at line 105
bool is_inactive()

Check if the item is inactive.

Return Value

bool

at line 113
bool is_enabled()

Check if the item is enabled.

Return Value

bool

at line 121
bool is_disabled()

Check if the item is disabled.

Return Value

bool

at line 133
bool is_pending()

Check if the item awaits processing.

Return Value

bool

at line 141
bool is_approved()

Check if the item is approved.

Return Value

bool

at line 149
bool is_rejected()

Check if the item was rejected.

Return Value

bool

at line 161
bool is_not_started()

Check if the item has not started.

Return Value

bool

at line 169
bool is_in_progress()

Check if the item is in progress.

Return Value

bool

at line 177
bool is_completed()

Check if the item is completed.

Return Value

bool

at line 185
bool is_failed()

Check if the item has failed.

Return Value

bool

at line 193
bool is_expired()

Check if the item is expired.

Return Value

bool

at line 201
bool is_canceled()

Check if the item is canceled.

Return Value

bool

at line 209
bool is_paused()

Check if the item is paused.

Return Value

bool

at line 221
bool is_queued()

Check if the item is queued.

Return Value

bool

at line 229
bool is_running()

Check if the item is running.

Return Value

bool

at line 237
bool is_syncing()

Check if the item is syncing.

Return Value

bool

at line 245
bool is_synced()

Check if the item finished syncing.

Return Value

bool

at line 257
bool is_error()

Check if the item is in an error state.

Return Value

bool