We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3930120 + d3104c8 commit 3acb37eCopy full SHA for 3acb37e
src/Plugin.php
@@ -16,11 +16,27 @@
16
*/
17
namespace Authorization;
18
19
+use Authorization\Command\PolicyCommand;
20
+use Cake\Console\CommandCollection;
21
use Cake\Core\BasePlugin;
22
23
/**
24
* Plugin definition for Authorization
25
26
class Plugin extends BasePlugin
27
{
28
+ /**
29
+ * Add console commands if bake is also available.
30
+ *
31
+ * @param \Cake\Console\CommandCollection $commands The command collection to update
32
+ * @return \Cake\Console\CommandCollection
33
+ */
34
+ public function console(CommandCollection $commands): CommandCollection
35
+ {
36
+ if (class_exists('Bake\Command\SimpleBakeCommand')) {
37
+ $commands->add('bake policy', PolicyCommand::class);
38
+ }
39
+
40
+ return $commands;
41
42
}
0 commit comments