public static function Schedule::formatPeriod in Backup and Migrate 8.4
Same name and namespace in other branches
- 5.0.x src/Entity/Schedule.php \Drupal\backup_migrate\Entity\Schedule::formatPeriod()
Convert a period array into seconds.
Parameters
$period:
Return value
\Drupal\Core\StringTranslation\PluralTranslatableMarkup
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 207
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']);
}