@@ 43-72 (lines=30) @@ | ||
40 | $this->config = $config; |
|
41 | } |
|
42 | ||
43 | protected function configure() { |
|
44 | parent::configure(); |
|
45 | ||
46 | $this |
|
47 | ->setName('config:app:set') |
|
48 | ->setDescription('Set an app config value') |
|
49 | ->addArgument( |
|
50 | 'app', |
|
51 | InputArgument::REQUIRED, |
|
52 | 'Name of the app' |
|
53 | ) |
|
54 | ->addArgument( |
|
55 | 'name', |
|
56 | InputArgument::REQUIRED, |
|
57 | 'Name of the config to set' |
|
58 | ) |
|
59 | ->addOption( |
|
60 | 'value', |
|
61 | null, |
|
62 | InputOption::VALUE_REQUIRED, |
|
63 | 'The new value of the config' |
|
64 | ) |
|
65 | ->addOption( |
|
66 | 'update-only', |
|
67 | null, |
|
68 | InputOption::VALUE_NONE, |
|
69 | 'Only updates the value, if it is not set before, it is not being added' |
|
70 | ) |
|
71 | ; |
|
72 | } |
|
73 | ||
74 | protected function execute(InputInterface $input, OutputInterface $output) { |
|
75 | $appName = $input->getArgument('app'); |
@@ 44-75 (lines=32) @@ | ||
41 | $this->systemConfig = $systemConfig; |
|
42 | } |
|
43 | ||
44 | protected function configure() { |
|
45 | parent::configure(); |
|
46 | ||
47 | $this |
|
48 | ->setName('config:system:set') |
|
49 | ->setDescription('Set a system config value') |
|
50 | ->addArgument( |
|
51 | 'name', |
|
52 | InputArgument::REQUIRED | InputArgument::IS_ARRAY, |
|
53 | 'Name of the config parameter, specify multiple for array parameter' |
|
54 | ) |
|
55 | ->addOption( |
|
56 | 'type', |
|
57 | null, |
|
58 | InputOption::VALUE_REQUIRED, |
|
59 | 'Value type [string, integer, double, boolean]', |
|
60 | 'string' |
|
61 | ) |
|
62 | ->addOption( |
|
63 | 'value', |
|
64 | null, |
|
65 | InputOption::VALUE_REQUIRED, |
|
66 | 'The new value of the config' |
|
67 | ) |
|
68 | ->addOption( |
|
69 | 'update-only', |
|
70 | null, |
|
71 | InputOption::VALUE_NONE, |
|
72 | 'Only updates the value, if it is not set before, it is not being added' |
|
73 | ) |
|
74 | ; |
|
75 | } |
|
76 | ||
77 | protected function execute(InputInterface $input, OutputInterface $output) { |
|
78 | $configNames = $input->getArgument('name'); |
@@ 48-66 (lines=19) @@ | ||
45 | $this->globalService = $globalService; |
|
46 | } |
|
47 | ||
48 | protected function configure() { |
|
49 | $this |
|
50 | ->setName('files_external:config') |
|
51 | ->setDescription('Manage backend configuration for a mount') |
|
52 | ->addArgument( |
|
53 | 'mount_id', |
|
54 | InputArgument::REQUIRED, |
|
55 | 'The id of the mount to edit' |
|
56 | )->addArgument( |
|
57 | 'key', |
|
58 | InputArgument::REQUIRED, |
|
59 | 'key of the config option to set/get' |
|
60 | )->addArgument( |
|
61 | 'value', |
|
62 | InputArgument::OPTIONAL, |
|
63 | 'value to set the config option to, when no value is provided the existing value will be printed' |
|
64 | ); |
|
65 | parent::configure(); |
|
66 | } |
|
67 | ||
68 | protected function execute(InputInterface $input, OutputInterface $output) { |
|
69 | $mountId = $input->getArgument('mount_id'); |
@@ 83-105 (lines=23) @@ | ||
80 | $this->backendService = $backendService; |
|
81 | } |
|
82 | ||
83 | protected function configure() { |
|
84 | $this |
|
85 | ->setName('files_external:import') |
|
86 | ->setDescription('Import mount configurations') |
|
87 | ->addOption( |
|
88 | 'user', |
|
89 | null, |
|
90 | InputOption::VALUE_OPTIONAL, |
|
91 | 'user to add the mount configurations for, if not set the mount will be added as system mount' |
|
92 | ) |
|
93 | ->addArgument( |
|
94 | 'path', |
|
95 | InputArgument::REQUIRED, |
|
96 | 'path to a json file containing the mounts to import, use "-" to read from stdin' |
|
97 | ) |
|
98 | ->addOption( |
|
99 | 'dry', |
|
100 | null, |
|
101 | InputOption::VALUE_NONE, |
|
102 | 'Don\'t save the imported mounts, only list the new mounts' |
|
103 | ); |
|
104 | parent::configure(); |
|
105 | } |
|
106 | ||
107 | protected function execute(InputInterface $input, OutputInterface $output) { |
|
108 | $user = $input->getOption('user'); |