interface DurationServiceInterface in Duration Field 8
Same name and namespace in other branches
- 8.2 src/Service/DurationServiceInterface.php \Drupal\duration_field\Service\DurationServiceInterface
- 3.0.x src/Service/DurationServiceInterface.php \Drupal\duration_field\Service\DurationServiceInterface
Interface for classes providing services for the Duration Field module.
Hierarchy
- interface \Drupal\duration_field\Service\DurationServiceInterface
Expanded class hierarchy of DurationServiceInterface
All classes that implement DurationServiceInterface
1 file declares its use of DurationServiceInterface
- DurationWidget.php in src/
Plugin/ Field/ FieldWidget/ DurationWidget.php
File
- src/
Service/ DurationServiceInterface.php, line 8
Namespace
Drupal\duration_field\ServiceView source
interface DurationServiceInterface {
/**
* Checks if a given duration is a valid Iso8601 duration format.
*
* @input string $duration
* The string whose format should be checked
*
* @return bool
* - TRUE if the string is a valid format
* - FALSE if it's an invalid format
*
* @see http://en.wikipedia.org/wiki/Iso8601#Durations
*/
public static function checkDurationInvalid($duration);
/**
* Convert array into PHP duration format.
*
* @param array $input
* An array containing any of the following keys:
* - year
* - month
* - day
* - hour
* - minute
* - second.
*
* @return string
* A string in Iso 8601 duration format
*
* @see http://en.wikipedia.org/wiki/Iso8601#Durations
*/
public static function convertValue(array $input);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DurationServiceInterface:: |
public static | function | Checks if a given duration is a valid Iso8601 duration format. | 1 |
DurationServiceInterface:: |
public static | function | Convert array into PHP duration format. | 1 |