Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate) | |
beforeSave ($object) | |
formatDate ($date) | |
![]() | |
setAttribute ($attribute) | |
getAttribute () | |
getType () | |
isStatic () | |
getTable () | |
getEntityIdField () | |
setValueId ($valueId) | |
setEntityValueId ($entity, $valueId) | |
getValueId () | |
getEntityValueId ($entity) | |
getDefaultValue () | |
validate ($object) | |
afterLoad ($object) | |
beforeSave ($object) | |
afterSave ($object) | |
beforeDelete ($object) | |
afterDelete ($object) | |
getAffectedFields ($object) | |
isScalar () | |
Protected Attributes | |
$_localeDate | |
![]() | |
$_attribute | |
$_valueId | |
$_valueIds = [] | |
$_table | |
$_entityIdField | |
$_defaultValue = null | |
__construct | ( | \Magento\Framework\Stdlib\DateTime\TimezoneInterface | $localeDate | ) |
\Magento\Framework\Stdlib\DateTime\TimezoneInterface | $localeDate | @codeCoverageIgnore |
Definition at line 24 of file Datetime.php.
beforeSave | ( | $object | ) |
Formatting date value before save
Should set (bool, string) correct type for empty value from html form, necessary for further process, else date string
\Magento\Framework\DataObject | $object |
Implements BackendInterface.
Definition at line 39 of file Datetime.php.
formatDate | ( | $date | ) |
Prepare date for save in DB
string format used from input fields (all date input fields need apply locale settings) int value can be declared in code (this meen whot we use valid date)
string | int | \DateTimeInterface | $date |
Definition at line 70 of file Datetime.php.
|
protected |
Definition at line 18 of file Datetime.php.