You are here

public function Schedule::getPeriodFormatted in Backup and Migrate 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Entity/Schedule.php \Drupal\backup_migrate\Entity\Schedule::getPeriodFormatted()

Return the schedule frequency formatted for display in human language.

Return value

\Drupal\Core\StringTranslation\PluralTranslatableMarkup The schedule frequency.

Throws

\Drupal\backup_migrate\Core\Exception\BackupMigrateException

File

src/Entity/Schedule.php, line 228

Class

Schedule
Defines the Schedule entity.

Namespace

Drupal\backup_migrate\Entity

Code

public function getPeriodFormatted() {
  return Schedule::formatPeriod(Schedule::secondsToPeriod($this
    ->get('period')));
}