@@ -194,32 +194,12 @@ Building a ConsoleOptionParser from an Array
194194
195195.. php :method :: buildFromArray($spec)
196196
197- As previously mentioned, when creating subcommand option parsers, you can define
198- the parser spec as an array for that method. This can help make building
199- subcommand parsers easier, as everything is an array::
200-
201- $parser->addSubcommand('check', [
202- 'help' => __('Check the permissions between an ACO and ARO.'),
203- 'parser' => [
204- 'description' => [
205- __("Use this command to grant ACL permissions. Once executed, the "),
206- __("ARO specified (and its children, if any) will have ALLOW access "),
207- __("to the specified ACO action (and the ACO's children, if any)."),
208- ],
209- 'arguments' => [
210- 'aro' => ['help' => __('ARO to check.'), 'required' => true],
211- 'aco' => ['help' => __('ACO to check.'), 'required' => true],
212- 'action' => ['help' => __('Action to check')],
213- ],
214- ],
215- ]);
216-
217- Inside the parser spec, you can define keys for ``arguments ``, ``options ``,
218- ``description `` and ``epilog ``. You cannot define ``subcommands `` inside an
219- array style builder. The values for arguments, and options, should follow the
220- format that :php:func: `Cake\\ Console\\ ConsoleOptionParser::addArguments() ` and
197+ Option parsers can also be defined as arrays. Within the array, you can define
198+ keys for ``arguments ``, ``options ``, ``description `` and ``epilog ``. The values
199+ for arguments, and options, should follow the format that
200+ :php:func: `Cake\\ Console\\ ConsoleOptionParser::addArguments() ` and
221201:php:func: `Cake\\ Console\\ ConsoleOptionParser::addOptions() ` use. You can also
222- use buildFromArray on its own, to build an option parser::
202+ use `` buildFromArray `` on its own, to build an option parser::
223203
224204 public function getOptionParser()
225205 {
@@ -287,8 +267,8 @@ returned as XML:
287267 cake bake --help xml
288268 cake bake -h xml
289269
290- The above would return an XML document with the generated help, options,
291- arguments and subcommands for the selected shell. A sample XML document would
270+ The above would return an XML document with the generated help, options, and
271+ arguments for the selected shell. A sample XML document would
292272look like:
293273
294274.. code-block :: xml
0 commit comments