SavableComponentTrait
- Type
- Trait
- Namespace
- craft\base
- Implemented by
- craft\base\Field, craft\base\Fs, craft\base\SavableComponent, craft\base\Widget, craft\fields\Assets, craft\fields\BaseOptionsField, craft\fields\BaseRelationField, craft\fields\Categories, craft\fields\Checkboxes, craft\fields\Color, craft\fields\Date, craft\fields\Dropdown, craft\fields\Email, craft\fields\Entries, craft\fields\Lightswitch, craft\fields\Matrix, craft\fields\MissingField, craft\fields\Money, craft\fields\MultiSelect, craft\fields\Number, craft\fields\PlainText, craft\fields\RadioButtons, craft\fields\Table, craft\fields\Tags, craft\fields\Time, craft\fields\Url, craft\fields\Users, craft\fs\Local, craft\fs\MissingFs, craft\fs\Temp, craft\widgets\CraftSupport, craft\widgets\Feed, craft\widgets\MissingWidget, craft\widgets\MyDrafts, craft\widgets\NewUsers, craft\widgets\QuickPost, craft\widgets\RecentEntries, craft\widgets\Updates
- Since
- 3.0.0
SavableComponentTrait implements the common methods and properties for savable component classes.
View source (opens new window)
# Public Properties
Property | Description |
---|---|
dateCreated | DateTime (opens new window), null (opens new window) – The date that the component was created |
dateUpdated | DateTime (opens new window), null (opens new window) – The date that the component was last updated |
id | integer (opens new window), string (opens new window), null (opens new window) – The component’s ID (could be a temporary one: "new:X") |
# dateCreated
- Type
- DateTime (opens new window), null (opens new window)
- Default value
null
The date that the component was created
View source (opens new window)
# dateUpdated
- Type
- DateTime (opens new window), null (opens new window)
- Default value
null
The date that the component was last updated
View source (opens new window)
# id
- Type
- integer (opens new window), string (opens new window), null (opens new window)
- Default value
null
The component’s ID (could be a temporary one: "new:X")