Craft 3 Class Reference

Trait craft\base\SavableComponentTrait

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\Delete, craft\elements\actions\DeleteAssets, craft\elements\actions\DeleteUsers, craft\elements\actions\DownloadAssetFile, 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\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
Available since version
3.0
Source Code
https://github.com/craftcms/cms/blob/master/src/base/SavableComponentTrait.php

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

Public Properties
Property Type Description Defined By
$dateCreated DateTime, null The date that the component was created craft\base\SavableComponentTrait
$dateUpdated DateTime, null The date that the component was last updated craft\base\SavableComponentTrait
$id integer, string, null The component’s ID (could be a temporary one: "new:X") craft\base\SavableComponentTrait

Property Details

$dateCreated public property #

The date that the component was created

public DateTime, null $dateCreated null

$dateUpdated public property #

The date that the component was last updated

public DateTime, null $dateUpdated null

$id public property #

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

public integer, string, null $id null