-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregenerate.php
More file actions
executable file
·47 lines (43 loc) · 1.54 KB
/
regenerate.php
File metadata and controls
executable file
·47 lines (43 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env php
<?php
/**
* Script pour régénérer les miniatures
*
* Usage:
* php regenerate.php list
*
* # Produits
* php regenerate.php products --product-id=1
* php regenerate.php products --limit=10
* php regenerate.php products --image-type=cart_default
*
* # Catégories
* php regenerate.php images --type=categories
* php regenerate.php images --type=categories --entity-id=3
* php regenerate.php images --type=categories --limit=10
*
* # Fabricants
* php regenerate.php images --type=manufacturers
* php regenerate.php images --type=manufacturers --entity-id=1
*
* # Fournisseurs
* php regenerate.php images --type=suppliers
*
* # Magasins
* php regenerate.php images --type=stores
*/
require_once __DIR__ . '/../../config/config.inc.php';
require_once __DIR__ . '/vendor/autoload.php';
use PrestaShop\Module\Ldimagegeneration\Command\RegenerateProductThumbnailsCommand;
use PrestaShop\Module\Ldimagegeneration\Command\RegenerateImagesCommand;
use PrestaShop\Module\Ldimagegeneration\Command\CleanImagesCommand;
use PrestaShop\Module\Ldimagegeneration\Command\VerifyImagesCommand;
use Symfony\Component\Console\Application;
$application = new Application('Image Generation', '1.0.0');
$application->add(new RegenerateProductThumbnailsCommand());
$application->add(new RegenerateImagesCommand());
$application->add(new CleanImagesCommand());
$application->add(new VerifyImagesCommand());
// Créer des alias pour faciliter l'utilisation
$application->setDefaultCommand('list');
$application->run();