Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #165 from tkawaji/develop_add_shell_option
Browse files Browse the repository at this point in the history
add shell option remove-behaviors
  • Loading branch information
davidyell committed Mar 3, 2016
2 parents 1fc9561 + 6729ad5 commit e8ac2dc
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Shell/ProfferShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public function getOptionParser()
'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.'),
],
]
]
]);
Expand All @@ -58,7 +61,10 @@ public function getOptionParser()
'short' => 'd',
'help' => __('Do a dry run and don\'t delete any files.'),
'boolean' => true
]
],
'remove-behaviors' => [
'help' => __('The behaviors to remove before cleanup.'),
],
]
],
]);
Expand Down Expand Up @@ -294,5 +300,12 @@ protected function checkTable($table)
}

}

if ($this->param('remove-behaviors')) {
$removeBehaviors = explode(',', (string)$this->param('remove-behaviors'));
foreach ($removeBehaviors as $removeBehavior) {
$this->Table->removeBehavior($removeBehavior);
}
}
}
}

0 comments on commit e8ac2dc

Please sign in to comment.