function DurationInterface::getDuration
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Type/DurationInterface.php \Drupal\Core\TypedData\Type\DurationInterface::getDuration()
- 8.9.x core/lib/Drupal/Core/TypedData/Type/DurationInterface.php \Drupal\Core\TypedData\Type\DurationInterface::getDuration()
- 10 core/lib/Drupal/Core/TypedData/Type/DurationInterface.php \Drupal\Core\TypedData\Type\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.