interface PeriodEntityInterface in Recurring Time Period 8
Interface for entities that represent a time period.
Hierarchy
- interface \Drupal\recurring_period\Entity\PeriodEntityInterface
Expanded class hierarchy of PeriodEntityInterface
All classes that implement PeriodEntityInterface
See also
\Drupal\recurring_period\Entity\PeriodEntityTrait
File
- src/
Entity/ PeriodEntityInterface.php, line 12
Namespace
Drupal\recurring_period\EntityView source
interface PeriodEntityInterface {
/**
* Gets the start date/time.
*
* @return \Drupal\Core\Datetime\DrupalDateTime
* The start date/time.
*/
public function getStartDate();
/**
* Gets the end date/time.
*
* @return \Drupal\Core\Datetime\DrupalDateTime
* The end date/time.
*/
public function getEndDate();
/**
* Gets the duration of the period, in seconds.
*
* @return int
* The duration.
*/
public function getDuration();
/**
* Checks whether the given date/time is contained in the period.
*
* @param \Drupal\Core\Datetime\DrupalDateTime $date
* The date/time.
*
* @return bool
* TRUE if the date/time is contained in the period, FALSE otherwise.
*/
public function contains(DrupalDateTime $date);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PeriodEntityInterface:: |
public | function | Checks whether the given date/time is contained in the period. | |
PeriodEntityInterface:: |
public | function | Gets the duration of the period, in seconds. | |
PeriodEntityInterface:: |
public | function | Gets the end date/time. | |
PeriodEntityInterface:: |
public | function | Gets the start date/time. |