Same name and namespace in other branches
- 8.9.x core/lib/Drupal/Core/TypedData/Type/DurationInterface.php \Drupal\Core\TypedData\Type\DurationInterface
- 9 core/lib/Drupal/Core/TypedData/Type/DurationInterface.php \Drupal\Core\TypedData\Type\DurationInterface
Interface for durations.
Hierarchy
- interface \Drupal\Core\TypedData\Type\DurationInterface
Expanded class hierarchy of DurationInterface
All classes that implement DurationInterface
Related topics
2 files declare their use of DurationInterface
- PrimitiveTypeConstraintValidator.php in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ PrimitiveTypeConstraintValidator.php - TypedDataTest.php in core/
tests/ Drupal/ KernelTests/ Core/ TypedData/ TypedDataTest.php
File
- core/
lib/ Drupal/ Core/ TypedData/ Type/ DurationInterface.php, line 10
Namespace
Drupal\Core\TypedData\TypeView source
interface DurationInterface {
/**
* Returns the duration.
*
* @return \DateInterval|null
* A DateInterval object or NULL if there is no duration.
*
* @throws \Exception
*/
public function getDuration();
/**
* Sets the duration.
*
* @param \DateInterval $duration
* A duration to set.
*/
public function setDuration(\DateInterval $duration);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DurationInterface:: |
public | function | Returns the duration. | |
DurationInterface:: |
public | function | Sets the duration. |