SavableComponentTrait

Type
Trait
Namespace
craft\base
Implemented by
craft\base\ElementAction, craft\base\Field, craft\base\FlysystemVolume, craft\base\SavableComponent, craft\base\Volume, craft\base\Widget, craft\elements\actions\CopyReferenceTag, craft\elements\actions\DeepDuplicate, craft\elements\actions\Delete, craft\elements\actions\DeleteAssets, craft\elements\actions\DeleteUsers, craft\elements\actions\DownloadAssetFile, craft\elements\actions\Duplicate, craft\elements\actions\Edit, craft\elements\actions\EditImage, craft\elements\actions\NewChild, craft\elements\actions\PreviewAsset, craft\elements\actions\RenameFile, craft\elements\actions\ReplaceFile, craft\elements\actions\Restore, craft\elements\actions\SetStatus, craft\elements\actions\SuspendUsers, craft\elements\actions\UnsuspendUsers, craft\elements\actions\View, 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\mail\transportadapters\BaseTransportAdapter, craft\mail\transportadapters\Gmail, craft\mail\transportadapters\Sendmail, craft\mail\transportadapters\Smtp, 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

SavableComponentTrait implements the common methods and properties for savable component classes.

View source

Public Properties

PropertyDescription
dateCreatedDateTime, null – The date that the component was created
dateUpdatedDateTime, null – The date that the component was last updated
idinteger, 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