src/Shell/ProfferShell.php
public function getOptionParser()
    {
        $parser = parent::getOptionParser();
        $parser->addSubcommand('generate', [
            'help' => __('Regenerate thumbnails for a specific table.'),
            'parser' => [
                'description' => [__('Use this command to regenerate the thumbnails for a specific table.')],
                'arguments' => [
                    'table' => ['help' => __('The table to regenerate thumbs for'), 'required' => true]
                ],
                'options' => [
                    'path-class' => [
                        'short' => 'p',
                        'help' => __('Fully name spaced custom path class, you must use double backslash.')
                    ],
                    'image-class' => [
                        'short' => 'i',
                        'help' => __('Fully name spaced custom image transform class, you must use double backslash.')
                    ],
                    'remove-behaviors' => [
                        'help' => __('The behaviors to remove before generate.'),
                    ],
                ]
            ]
        ]);
        $parser->addSubcommand('cleanup', [
            'help' => __('Clean up old images on the file system which are not linked in the database.'),
            'parser' => [
                'description' => [__('This command will delete images which are not part of the model configuration.')],
                'arguments' => [
                    'table' => ['help' => __('The table to regenerate thumbs for'), 'required' => true]
                ],
                'options' => [
                    'dry-run' => [
                        'short' => 'd',
                        'help' => __('Do a dry run and don\'t delete any files.'),
                        'boolean' => true
                    ],
                    'remove-behaviors' => [
                        'help' => __('The behaviors to remove before cleanup.'),
                    ],
                ]
            ],
        ]);

        return $parser;
    }
public function getOptionParser()
    {
        $parser = parent::getOptionParser();
        $parser->addSubcommand('generate', [
            'help' => __('Regenerate thumbnails for a specific table.'),
            'parser' => [
                'description' => [__('Use this command to regenerate the thumbnails for a specific table.')],
                'arguments' => [
                    'table' => ['help' => __('The table to regenerate thumbs for'), 'required' => true]
                ],
                'options' => [
                    'path-class' => [
                        'short' => 'p',
                        'help' => __('Fully name spaced custom path class, you must use double backslash.')
                    ],
                    'image-class' => [
                        'short' => 'i',
                        'help' => __('Fully name spaced custom image transform class, you must use double backslash.')
                    ],
                    'remove-behaviors' => [
                        'help' => __('The behaviors to remove before generate.'),
                    ],
                ]
            ]
        ]);
        $parser->addSubcommand('cleanup', [
            'help' => __('Clean up old images on the file system which are not linked in the database.'),
            'parser' => [
                'description' => [__('This command will delete images which are not part of the model configuration.')],
                'arguments' => [
                    'table' => ['help' => __('The table to regenerate thumbs for'), 'required' => true]
                ],
                'options' => [
                    'dry-run' => [
                        'short' => 'd',
                        'help' => __('Do a dry run and don\'t delete any files.'),
                        'boolean' => true
                    ],
                    'remove-behaviors' => [
                        'help' => __('The behaviors to remove before cleanup.'),
                    ],
                ]
            ],
        ]);

        return $parser;
    }
public function getOptionParser ( ) { $ parser = parent :: getOptionParser ( ) ; $ parser -> addSubcommand ( 'generate' , [ 'help' => __ ( 'Regenerate thumbnails for a specific table.' ) , 'parser' => [ 'description' => [ __ ( 'Use this command to regenerate the thumbnails for a specific table.' ) ] , 'arguments' => [ 'table' => [ 'help' => __ ( 'The table to regenerate thumbs for' ) , 'required' => true ] ] , 'options' => [ 'path-class' => [ 'short' => 'p' , 'help' => __ ( 'Fully name spaced custom path class, you must use double backslash.' ) ] , 'image-class' => [ 'short' => 'i' , 'help' => __ ( 'Fully name spaced custom image transform class, you must use double backslash.' ) ] , 'remove-behaviors' => [ 'help' => __ ( 'The behaviors to remove before generate.' ) , ] , ] ] ] ) ; $ parser -> addSubcommand ( 'cleanup' , [ 'help' => __ ( 'Clean up old images on the file system which are not linked in the database.' ) , 'parser' => [ 'description' => [ __ ( 'This command will delete images which are not part of the model configuration.' ) ] , 'arguments' => [ 'table' => [ 'help' => __ ( 'The table to regenerate thumbs for' ) , 'required' => true ] ] , 'options' => [ 'dry-run' => [ 'short' => 'd' , 'help' => __ ( 'Do a dry run and don\'t delete any files.' ) , 'boolean' => true ] , 'remove-behaviors' => [ 'help' => __ ( 'The behaviors to remove before cleanup.' ) , ] , ] ] , ] ) ; return $ parser ; }
Return the help options and validate arguments

@return \Cake\Console\ConsoleOptionParser
Return the help options and validate arguments