function DateTimeIso8601::setDateTime
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php \Drupal\Core\TypedData\Plugin\DataType\DateTimeIso8601::setDateTime()
- 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php \Drupal\Core\TypedData\Plugin\DataType\DateTimeIso8601::setDateTime()
- 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php \Drupal\Core\TypedData\Plugin\DataType\DateTimeIso8601::setDateTime()
Overrides DateTimeInterface::setDateTime
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DateTimeIso8601.php, line 40
Class
- DateTimeIso8601
- A data type for ISO 8601 date strings.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function setDateTime(DrupalDateTime $dateTime, $notify = TRUE) {
$this->value = $dateTime->format('c');
// Notify the parent of any changes.
if ($notify && isset($this->parent)) {
$this->parent
->onChange($this->name);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.