Skip to content

Commit 3a59ed1

Browse files
committed
add NewClassCmd
1 parent 72d20d8 commit 3a59ed1

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Ubiquity/devtools/cmd/Command.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,25 @@ public static function newMail() {
543543
return new Command("new-mail", "name", "Creates a new mailer class.", [
544544
"newMail",
545545
"new:mail"
546-
], [], [
546+
], [
547+
"p" => Parameter::create("parent", "The class parent.", [],'\\Ubiquity\\mailer\\AbstractMail'),
548+
"v" => Parameter::create("view", "Add the associated view.", [],false)
549+
], [
547550
'Creates a new mailer class' => 'Ubiquity newMail InformationMail'
548551
], 'mailer');
549552
}
553+
554+
public static function newClass() {
555+
return new Command("new-class", "name", "Creates a new class.", [
556+
"newClass",
557+
"new:class",
558+
"class"
559+
], [
560+
"p" => Parameter::create("parent", "The class parent.")
561+
], [
562+
'Creates a new class' => 'Ubiquity class services.OrgaRepository'
563+
], 'controllers');
564+
}
550565

551566
public static function createCommand() {
552567
return new Command("create-command", "commandName", "Creates a new custom command for the devtools.", [
@@ -676,6 +691,7 @@ public static function getCommands() {
676691
self::newAction(),
677692
self::authController(),
678693
self::crudController(),
694+
self::newClass(),
679695
self::newTheme(),
680696
self::installTheme(),
681697

0 commit comments

Comments
 (0)