public static function Schedule::formatPeriod 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::formatPeriod()
Convert a period array into seconds.
Parameters
int $period: The array to convert.
Return value
\Drupal\Core\StringTranslation\PluralTranslatableMarkup The converted period.
1 call to Schedule::formatPeriod()
- Schedule::getPeriodFormatted in src/
Entity/ Schedule.php - Return the schedule frequency formatted for display in human language.
File
- src/
Entity/ Schedule.php, line 278
Class
- Schedule
- Defines the Schedule entity.
Namespace
Drupal\backup_migrate\EntityCode
public static function formatPeriod($period) {
return \Drupal::translation()
->formatPlural($period['number'], $period['type']['singular'], $period['type']['plural']);
}