X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/platform/plugins/translation/src/Console
home
/
gfecatvj
/
sites
/
realesbar
/
platform
/
plugins
/
translation
/
src
/
Console
/
📁
..
📄
CleanCommand.php
(927 B)
📄
ExportCommand.php
(2.18 KB)
📄
FindCommand.php
(961 B)
📄
ImportCommand.php
(1.32 KB)
📄
ResetCommand.php
(915 B)
Editing: ImportCommand.php
<?php namespace Botble\Translation\Console; use Botble\Translation\Manager; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; class ImportCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'cms:translations:import'; /** * The console command description. * * @var string */ protected $description = 'Import translations from the PHP sources'; /** * @var Manager */ protected $manager; /** * ImportCommand constructor. * @param Manager $manager */ public function __construct(Manager $manager) { $this->manager = $manager; parent::__construct(); } /** * Execute the console command. * * @return int */ public function handle() { $this->info('Importing...'); $replace = $this->option('replace'); $counter = $this->manager->importTranslations($replace); $this->info('Done importing, processed ' . $counter . ' items!'); return 0; } /** * Get the console command options. * * @return array */ protected function getOptions() { return [ ['replace', 'R', InputOption::VALUE_NONE, 'Replace existing keys'], ]; } }
Upload File
Create Folder