setName('supportedarea:import') ->setDescription('Extracts map data of the supported area from the KML file and saves to database') ->setHelp('Gets the coordinates of the supported area and saves to the database') ->addArgument('file', InputArgument::REQUIRED, 'Path to the KML file'); } public function __construct(KMLFileImporter $importer) { $this->importer = $importer; parent::__construct(); } protected function execute(InputInterface $input, OutputInterface $output) { $kml_file = $input->getArgument('file'); $this->importer->getMapData($kml_file); } }