function DurationInterface::getDuration
Returns the duration.
Return value
\DateInterval|null A DateInterval object or NULL if there is no duration.
Throws
\Exception
2 methods override DurationInterface::getDuration()
- DurationIso8601::getDuration in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DurationIso8601.php - Returns the duration.
- TimeSpan::getDuration in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ TimeSpan.php - Returns the duration.
File
-
core/
lib/ Drupal/ Core/ TypedData/ Type/ DurationInterface.php, line 20
Class
- DurationInterface
- Interface for durations.
Namespace
Drupal\Core\TypedData\TypeCode
public function getDuration();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.