66use Symfony \Component \Console \Input \InputInterface ;
77use Symfony \Component \Console \Output \OutputInterface ;
88use Symfony \Component \Console \Helper \DialogHelper ;
9- use PHPCR \Util \Console \Command \BaseCommand ;
109
1110/**
1211 * Command which can update the properties of nodes found
1716 *
1817 * @author Daniel Leech <daniel@dantleech.com>
1918 */
20- class NodesUpdateCommand extends BaseCommand
19+ class NodesUpdateCommand extends BaseNodeManipulationCommand
2120{
2221 /**
2322 * {@inheritDoc}
@@ -82,8 +81,6 @@ protected function configure()
8281 */
8382 protected function execute (InputInterface $ input , OutputInterface $ output )
8483 {
85- $ this ->dialog = new DialogHelper ();
86-
8784 $ query = $ input ->getOption ('query ' );
8885 $ queryLanguage = strtoupper ($ input ->getOption ('query-language ' ));
8986 $ persistCounter = intval ($ input ->getOption ('persist-counter ' ));
@@ -93,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9390 $ removeMixins = $ input ->getOption ('remove-mixin ' );
9491 $ applyClosures = $ input ->getOption ('apply-closure ' );
9592 $ noInteraction = $ input ->getOption ('no-interaction ' );
96- $ helper = $ this ->getPhpcrCliHelper ();
93+ $ helper = $ this ->getPhpcrHelper ();
9794 $ session = $ this ->getPhpcrSession ();
9895
9996 if (!$ query ) {
@@ -154,7 +151,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
154151
155152 protected function getAction ($ output , $ result )
156153 {
157- $ response = strtoupper ($ this ->dialog ->ask ($ output , sprintf (
154+ /** @var $dialog DialogHelper */
155+ $ dialog = $ this ->getHelperSet ()->get ('dialog ' );
156+ $ response = strtoupper ($ dialog ->ask ($ output , sprintf (
158157 '<question>About to update %d nodes. Enter "Y" to continue, "N" to cancel or "L" to list.</question> ' ,
159158 count ($ result ->getRows ())
160159 ), false ));
0 commit comments