function DateTimeComputed::__construct
Overrides TypedData::__construct
File
-
core/
modules/ datetime/ src/ DateTimeComputed.php, line 30
Class
- DateTimeComputed
- A computed property for dates of date time field items.
Namespace
Drupal\datetimeCode
public function __construct(DataDefinitionInterface $definition, $name = NULL, ?TypedDataInterface $parent = NULL) {
parent::__construct($definition, $name, $parent);
if (!$definition->getSetting('date source')) {
throw new \InvalidArgumentException("The definition's 'date source' key has to specify the name of the date property to be computed.");
}
}