N98\Magento\Command\Config\DeleteCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (!$this->initMagento()) {
            return;
        }
        $deleted = array();
        $allowZeroScope = $input->getOption('force');
        $scope = $this->_validateScopeParam($input->getOption('scope'));
        $scopeId = $this->_convertScopeIdParam($scope, $input->getOption('scope-id'), $allowZeroScope);
        $path = $input->getArgument('path');
        if (false !== strstr($path, '*')) {
            $paths = $this->expandPathPattern($input, $path);
        } else {
            $paths = array($path);
        }
        foreach ($paths as $path) {
            $deleted = array_merge($deleted, $this->_deletePath($input, $path, $scopeId));
        }
        if (count($deleted) > 0) {
            $this->getHelper('table')->setHeaders(array('Deleted Path', 'Scope', 'Scope-ID'))->setRows($deleted)->render($output);
        }
    }