SavableComponentTrait

Type
Trait
Namespace
craft\base
Implemented by
craft\base\Field, craft\base\FlysystemVolume, craft\base\SavableComponent, craft\base\Volume, 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\MultiSelect, craft\fields\Number, craft\fields\PlainText, craft\fields\RadioButtons, craft\fields\Table, craft\fields\Tags, craft\fields\Url, craft\fields\Users, craft\volumes\Local, craft\volumes\MissingVolume, craft\volumes\Temp, craft\widgets\CraftSupport, craft\widgets\Feed, craft\widgets\MissingWidget, 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

# Public Properties

Property Description
dateCreated DateTime, null – The date that the component was created
dateUpdated DateTime, null – The date that the component was last updated
id integer, string, null – The component’s ID (could be a temporary one: "new:X")

# dateCreated

Type
DateTime, null

The date that the component was created

View source

# dateUpdated

Type
DateTime, null

The date that the component was last updated

View source

# id

Type
integer, string, null

The component’s ID (could be a temporary one: "new:X")

View source