Fire registered before command events

@param  mixed  $command

@return void
426077
protected function fireAfterCommandEvent($command, $result)
	{
		$eventName = $this->commandNameToEventName($command);

		$args = [$command, $result];

		$this->fireEvent($eventName, 'after', $args);
	}
830481
protected function fireEvent($event)
    {
        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
    }
1359322
public function enable(Command $command)
    {
        $command->call('down');

        foreach ($this->scripts as $script) {
            try {
                $this->app->make($script)->fire($command);
            } catch (\Exception $e) {
                $command->error($e->getMessage());

                return false;
            }
        }

        $command->call('up');

        return true;
    }
1365839
protected function execute($command)
    {
        $process = new Process($command);
        $process->setTimeout(null);
        $process->run();

        if (!$process->isSuccessful()) {
            throw new \RuntimeException($process->getErrorOutput());
        }
    }
1097278
private function handleDelete(DeleteCommand $command)
    {
        $this->state = ORMInterface::STATE_DELETED;
        $this->dispatch('deleted', new RecordEvent($this, $command));
    }
242411
protected function executeCommand($command)
    {

        try {
            CliExecutor::executeCommand($command);
        } catch (Exception $e) {
            exit($e->getMessage() . PHP_EOL . $e->getTraceAsString() . PHP_EOL);
        }
    }
1191884
protected function runCommand($command)
    {
        $method = 'image' . ucfirst(strtolower($command['command']));
        if (!method_exists($this, $method)) {
            return false;
        }
        call_user_func_array([$this, $method], $command['params']);
        
        return true;
    }
637325
protected function fireBeforeImportEvent()
    {
        $arEventData = [$this->getModelClass(), $this->arImportData];

        $arEventData = Event::fire(self::EVENT_BEFORE_IMPORT, $arEventData);
        if (empty($arEventData)) {
            return;
        }

        foreach ($arEventData as $arModelData) {
            if (empty($arModelData)) {
                continue;
            }

            foreach ($arModelData as $sKey => $sValue) {
                $this->arImportData[$sKey] = $sValue;
            }
        }
    }
700671
public function unregisterCommand($command)
    {
        if (! array_key_exists($command, $this->commands)) {
            throw new \Exception("A command with the name {$command} does not exist.");
        }

        unset($this->commands[$command]);
    }
530396
public function fire(Command $command)
    {
        if ($command->option('verbose')) {
            $command->call('key:generate');
            $command->call('api:key-generate');

            return;
        }
        $command->callSilent('key:generate');
        $command->callSilent('api:key-generate');
    }
272554
public function command($command)
    {
        if ($command instanceof CommandInterface) {
            $command->setContainer($this);
        }

        $this['console']->add($command);
    }
469485
public function fire(Command $command)
    {
        $gitignorePath = base_path('.gitignore');

        if (! $this->gitignoreContainsComposerLock($gitignorePath)) {
            return;
        }

        $removeComposerLock = $command->confirm('Do you want to remove composer.lock from .gitignore ?', true);
        if ($removeComposerLock) {
            $out = $this->getGitignoreLinesButComposerLock($gitignorePath);
            $this->writeNewGitignore($gitignorePath, $out);
        }
    }
180548
public function addCustomCommand($command)
    {
        $name = lcfirst(class_basename($command));

        $this->customCommands[$name] = $command;
    }
869732
public function handle(RemoveIncidentCommand $command)
    {
        $incident = $command->incident;

        event(new IncidentWasRemovedEvent($this->auth->user(), $incident));

        $incident->delete();
    }
151082
public function beforeAction($event)
    {
        if ($this->checkIsMutexAction($event->action->id)) {
            $mutexName = $this->composeMutexName($event->action->id);
            if (!$this->getMutex()->acquire($mutexName)) {
                echo "Execution terminated: command is already running.\n";
                $event->isValid = false;

                return false;
            }
        }
    }
108773
protected function fireBeforeOperation($operation, OperationArguments $args)
    {
        $this->getEventManager()->triggerEvent(
            new OperationEvent('beforeOperation', $this, $operation, $args)
        );
    }
170880
protected function _commandDelete($command)
    {
        $entity = $this->getController()->getItem();

        $command->append(array('label' => AnTranslator::_('LIB-AN-ACTION-DELETE')))
        ->href(route($entity->getURL()))
        ->setAttribute('data-action', 'delete')
        ->setAttribute('data-redirect', route('index.php?option=com_locations&view=locations'))
        ->class('action-delete');
    }