@@ -67,6 +67,14 @@ protected function configure()
6767 InputOption::VALUE_NONE ,
6868 'Dump a string reperesentation of the created / modified node. '
6969 )
70+ ->addOption ('add-mixin ' , null ,
71+ InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY ,
72+ 'Add a mixin to the node '
73+ )
74+ ->addOption ('remove-mixin ' , null ,
75+ InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY ,
76+ 'Add a mixin to the node '
77+ )
7078 ->setDescription ('Create or modify a node ' )
7179 ->setHelp (<<<HERE
7280This command allows you to create or modify a node at the specified path.
@@ -98,6 +106,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
98106 $ sets = $ input ->getOption ('set ' );
99107 $ unsets = $ input ->getOption ('unset ' );
100108 $ dump = $ input ->getOption ('dump ' );
109+ $ addMixins = $ input ->getOption ('add-mixin ' );
110+ $ removeMixins = $ input ->getOption ('remove-mixin ' );
101111
102112 try {
103113 $ node = $ session ->getNode ($ path );
@@ -158,6 +168,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
158168 $ node ->setProperty ($ unset , null );
159169 }
160170
171+ foreach ($ addMixins as $ addMixin ) {
172+ $ node ->addMixin ($ addMixin );
173+ }
174+
175+ foreach ($ removeMixins as $ removeMixin ) {
176+ $ node ->removeMixin ($ removeMixin );
177+ }
178+
161179 if ($ dump ) {
162180 $ output ->writeln ('<info>Node dump: </info> ' );
163181 foreach ($ node ->getProperties () as $ property ) {
0 commit comments