has_status
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
Check if the current status matches a specific value or Enum case.
Determine if the item is in draft state.
Determine if the item is published.
Determine if the item is archived.
Determine if the item is marked as deleted.
Check if the item is active.
Check if the item is inactive.
Check if the item is enabled.
Check if the item is disabled.
Check if the item awaits processing.
Check if the item is approved.
Check if the item was rejected.
Check if the item has not started.
Check if the item is in progress.
Check if the item is completed.
Check if the item has failed.
Check if the item is expired.
Check if the item is canceled.
Check if the item is paused.
Check if the item is queued.
Check if the item is running.
Check if the item is syncing.
Check if the item finished syncing.
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.
at line 61
bool
is_draft()
Determine if the item is in draft state.
at line 69
bool
is_published()
Determine if the item is published.
at line 77
bool
is_archived()
Determine if the item is archived.
at line 85
bool
is_deleted()
Determine if the item is marked as deleted.
at line 97
bool
is_active()
Check if the item is active.
at line 105
bool
is_inactive()
Check if the item is inactive.
at line 113
bool
is_enabled()
Check if the item is enabled.
at line 121
bool
is_disabled()
Check if the item is disabled.
at line 133
bool
is_pending()
Check if the item awaits processing.
at line 141
bool
is_approved()
Check if the item is approved.
at line 149
bool
is_rejected()
Check if the item was rejected.
at line 161
bool
is_not_started()
Check if the item has not started.
at line 169
bool
is_in_progress()
Check if the item is in progress.
at line 177
bool
is_completed()
Check if the item is completed.
at line 185
bool
is_failed()
Check if the item has failed.
at line 193
bool
is_expired()
Check if the item is expired.
at line 201
bool
is_canceled()
Check if the item is canceled.
at line 209
bool
is_paused()
Check if the item is paused.
at line 221
bool
is_queued()
Check if the item is queued.
at line 229
bool
is_running()
Check if the item is running.
at line 237
bool
is_syncing()
Check if the item is syncing.
at line 245
bool
is_synced()
Check if the item finished syncing.
at line 257
bool
is_error()
Check if the item is in an error state.