- Issue created by @promo-il
If anybody want to get Description (of advanced backup) in UI (Saved Backups)
\backup_migrate\src\Controller\BackupController.php
foreach ($backups as $backup_id => $backup) {
/*WT+:description in UI*/
$wtDescription = $backup->getMeta('description') ? $backup->getMeta('description')
:( ($fileContent = file_get_contents($backup->realpath() . ".info"))/*get file content*/
&& preg_match('/description\s=\s"(.*?)"/', str_replace(["\n",'""',"\r",], ['','',' '], $fileContent), $matches)
? $matches[1] : false);
/*<<<*/
$rows[] = [
'data' => [
// Cells.
/*WTmod*//*$backup->getFullName(),*/ $backup->getFullName() . ($wtDescription ? " || ({$wtDescription})" : ''),
\Drupal::service('date.formatter')
Active
5.0
Code