Statusable ​
- Type
- Interface
- Namespace
- craft\base
- Implemented by
- craft\base\ElementInterface
- Since
- 5.0.0
Statusable defines the common interface to be implemented by components that can have statuses within the control panel.
Public Methods ​
Method | Description |
---|---|
getStatus() | Returns the component’s status. |
statuses() | Returns all the possible statuses that components may have. |
getStatus()
​
Returns the component’s status.
Returns ​
statuses()
​
Returns all the possible statuses that components may have.
It should return an array whose keys are the status values, and values are the human-facing status labels, or an array with the following keys:
label
– The human-facing status label.color
– The status color. See\craft\base\craft\enums\Color
for possible values.