public static function Schedule::periodToSeconds in Backup and Migrate 5.0.x
Same name and namespace in other branches
- 8.4 src/Entity/Schedule.php \Drupal\backup_migrate\Entity\Schedule::periodToSeconds()
Convert a period array into seconds.
Parameters
array $period: A period array.
Return value
mixed The number of seconds. Should be an integer value.
Throws
\Drupal\backup_migrate\Core\Exception\BackupMigrateException
1 call to Schedule::periodToSeconds()
- ScheduleForm::buildEntity in src/
Form/ ScheduleForm.php - Builds an updated entity object based upon the submitted form values.
File
- src/
Entity/ Schedule.php, line 265
Class
- Schedule
- Defines the Schedule entity.
Namespace
Drupal\backup_migrate\EntityCode
public static function periodToSeconds(array $period) {
return $period['number'] * $period['type']['seconds'];
}