InitBackgroundImagesMigration.php 761 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Theming\Migration;
  8. use OCA\Theming\Jobs\MigrateBackgroundImages;
  9. use OCP\BackgroundJob\IJobList;
  10. use OCP\Migration\IOutput;
  11. class InitBackgroundImagesMigration implements \OCP\Migration\IRepairStep {
  12. private IJobList $jobList;
  13. public function __construct(IJobList $jobList) {
  14. $this->jobList = $jobList;
  15. }
  16. public function getName() {
  17. return 'Initialize migration of background images from dashboard to theming app';
  18. }
  19. public function run(IOutput $output) {
  20. $this->jobList->add(MigrateBackgroundImages::class, ['stage' => MigrateBackgroundImages::STAGE_PREPARE]);
  21. }
  22. }