namespace Cubist\Backpack\app\Console\Commands;
-use Illuminate\Console\Command;
-class LocaleCopy extends Command
+
+use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
+
+class LocaleCopy extends CubistCommand
{
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'cubist:locale:copy {from} {to}';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Copy locale to another one. Useful to start the translation of a website.';
+
+ public function handle()
+ {
+ $from = $this->argument('from');
+ $to = $this->argument('to');
+
+ $this->call('backup:run');
+
+ $this->_handleMagicFolder([$this, '_copyModel']);
+ }
+ /**
+ * @param $model CubistMagicAbstractModel
+ */
+ protected function _copyModel($model)
+ {
+ echo 'Copy locale of model ' . $model;
+ }
}