Commit e96ee186 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

- FIX remise en place de la commande 'activity:search-rebuild' (Réindexation...

- FIX remise en place de la commande 'activity:search-rebuild' (Réindexation du moteur de recherche des activités)
parent 1d7dacbb
Loading
Loading
Loading
Loading
+44 −0
Changes for module/Oscar/src/Oscar/Command/OscarActivitySearchReindexAllCommand.php: 44 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: bouvry
 * Date: 04/10/19
 * Time: 11:49
 */

namespace Oscar\Command;

use Exception;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class OscarActivitySearchReindexAllCommand extends OscarAdvancedCommandAbstract
{
    protected static $defaultName = OscarCommandAbstract::COMMAND_ACTIVITY_SEARCH_REINDEX_ALL;

    protected function configure()
    {
        parent::configure();
        $this
            ->setDescription("Reconstruction de l'index de recherche pour TOUTES les activités");
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        parent::execute($input, $output);

        try {

            if (!$this->ask("Réindexer toutes les activités ?")) {
                return 0;
            }

            $this->getProjectGrantService()->searchIndex_rebuild();

            return $this->finalSuccess("Index de recherche mis à jour");
        } catch (Exception $e) {
            return $this->finalFatalError($e);
        }
    }
}
 No newline at end of file
+10 −0
Changes for module/Oscar/src/Oscar/Hydrator/RoleFormHydrator.php: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php


namespace Oscar\Hydrator;


class RoleFormHydrator
{

}
 No newline at end of file
+10 −0
Changes for module/Oscar/src/Oscar/Utils/OscarConstants.php: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php


namespace Oscar\Utils;


interface OscarConstants
{

}
 No newline at end of file