Elcodi\Component\Geo\Command\Abstracts\AbstractLocationCommand::deleteCountry PHP Метод

deleteCountry() защищенный Метод

Ensure deletion of a country.
protected deleteCountry ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, $countryCode )
$input Symfony\Component\Console\Input\InputInterface The input interface
$output Symfony\Component\Console\Output\OutputInterface The output interface
    protected function deleteCountry(InputInterface $input, OutputInterface $output, $countryCode)
    {
        $noInteraction = $input->getOption('no-interaction');
        $country = $this->locationDirector->findOneBy(['code' => $countryCode]);
        if ($country instanceof LocationInterface) {
            if (!$noInteraction && !$this->confirmRemoval($input, $output, $countryCode, $output)) {
                return $this;
            }
            $this->dropCountry($country, $output);
        } else {
            $this->printMessage($output, 'Geo', 'Country ' . $countryCode . ' not found in your database');
        }
        return $this;
    }