@@ 40-61 (lines=22) @@ | ||
37 | ; |
|
38 | } |
|
39 | ||
40 | public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator) |
|
41 | { |
|
42 | $voterClassNameDetails = $generator->createClassNameDetails( |
|
43 | 'Notification', |
|
44 | 'Entity\\', |
|
45 | 'Entity' |
|
46 | ); |
|
47 | ||
48 | $generator->generateClass( |
|
49 | $voterClassNameDetails->getFullName(), |
|
50 | __DIR__.'/../Resources/skeleton/notification/DatabaseNotification.tpl.php', |
|
51 | [] |
|
52 | ); |
|
53 | ||
54 | $generator->writeChanges(); |
|
55 | ||
56 | $this->writeSuccessMessage($io); |
|
57 | ||
58 | $io->text([ |
|
59 | 'Next: Open your notification and add your logic.' |
|
60 | ]); |
|
61 | } |
|
62 | ||
63 | public function configureDependencies(DependencyBuilder $dependencies) |
|
64 | { |
@@ 41-71 (lines=31) @@ | ||
38 | ; |
|
39 | } |
|
40 | ||
41 | public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator) |
|
42 | { |
|
43 | // Create The notification class |
|
44 | // ask if create twig templates perhaps?? |
|
45 | // Use the configured channels to determine which channels to include in the class, or... |
|
46 | // ..ask user which of the enabled channels to use for the notification... |
|
47 | ||
48 | // Broadcasts could be to a mailing list also |
|
49 | // Broadcasts are for notifications to places that are not notifiables.. |
|
50 | // eg mailing lists, mercure, push notifications etc etc |
|
51 | ||
52 | $voterClassNameDetails = $generator->createClassNameDetails( |
|
53 | $input->getArgument('name'), |
|
54 | 'Notification\\', |
|
55 | 'Notification' |
|
56 | ); |
|
57 | ||
58 | $generator->generateClass( |
|
59 | $voterClassNameDetails->getFullName(), |
|
60 | __DIR__.'/../Resources/skeleton/notification/Notification.tpl.php', |
|
61 | [] |
|
62 | ); |
|
63 | ||
64 | $generator->writeChanges(); |
|
65 | ||
66 | $this->writeSuccessMessage($io); |
|
67 | ||
68 | $io->text([ |
|
69 | 'Next: Open your notification and add your logic.' |
|
70 | ]); |
|
71 | } |
|
72 | ||
73 | public function configureDependencies(DependencyBuilder $dependencies) |
|
74 | { |