Skip to content

Commit 876d898

Browse files
committed
Console: Update call of chamilo:import-access-url to app:import-access-url - refs BT#22437
1 parent d8602b3 commit 876d898

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/CoreBundle/Command/ImportAccessUrlCommand.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
2-
// src/CoreBundle/Command/ImportAccessUrlCommand.php
2+
3+
declare(strict_types=1);
4+
5+
/* For licensing terms, see /license.txt */
36

47
namespace Chamilo\CoreBundle\Command;
58

@@ -8,16 +11,19 @@
811
use Chamilo\CoreBundle\Entity\ResourceType;
912
use Doctrine\ORM\EntityManagerInterface;
1013
use PhpOffice\PhpSpreadsheet\IOFactory;
14+
use Symfony\Component\Console\Attribute\AsCommand;
1115
use Symfony\Component\Console\Command\Command;
1216
use Symfony\Component\Console\Input\InputArgument;
1317
use Symfony\Component\Console\Input\InputInterface;
1418
use Symfony\Component\Console\Output\OutputInterface;
1519
use Symfony\Component\Console\Style\SymfonyStyle;
1620

21+
#[AsCommand(
22+
name: 'app:import-access-url',
23+
description: 'Import AccessUrl entities from an XLSX file.',
24+
)]
1725
class ImportAccessUrlCommand extends Command
1826
{
19-
protected static $defaultName = 'chamilo:import-access-url';
20-
2127
private EntityManagerInterface $entityManager;
2228

2329
public function __construct(EntityManagerInterface $entityManager)
@@ -29,7 +35,6 @@ public function __construct(EntityManagerInterface $entityManager)
2935
protected function configure(): void
3036
{
3137
$this
32-
->setDescription('Import AccessUrl entities from an XLSX file')
3338
->addArgument('xlsx-file', InputArgument::REQUIRED, 'Path to the XLSX file')
3439
->addArgument('base-url', InputArgument::REQUIRED, 'Base URL for subdomains (e.g., https://somedomain.com/)')
3540
->setHelp('This command imports AccessUrl entities from an XLSX file. The file must have a title row with "subdomain" and "description" columns. Subdomains are lowercased. The ResourceNode parent is set to AccessUrl ID = 1.');

0 commit comments

Comments
 (0)