@@ 428-448 (lines=21) @@ | ||
425 | /** |
|
426 | * @return QuestionHelper|DialogHelper |
|
427 | */ |
|
428 | private function getQuestionHelper() |
|
429 | { |
|
430 | // NEXT_MAJOR: Remove this BC code for SensioGeneratorBundle 2.3/2.4 after dropping support for Symfony 2.3 |
|
431 | if (class_exists('Sensio\Bundle\GeneratorBundle\Command\Helper\DialogHelper')) { |
|
432 | $questionHelper = $this->getHelper('dialog'); |
|
433 | ||
434 | if (!$questionHelper instanceof DialogHelper) { |
|
435 | $questionHelper = new DialogHelper(); |
|
436 | $this->getHelperSet()->set($questionHelper); |
|
437 | } |
|
438 | } else { |
|
439 | $questionHelper = $this->getHelper('question'); |
|
440 | ||
441 | if (!$questionHelper instanceof QuestionHelper) { |
|
442 | $questionHelper = new QuestionHelper(); |
|
443 | $this->getHelperSet()->set($questionHelper); |
|
444 | } |
|
445 | } |
|
446 | ||
447 | return $questionHelper; |
|
448 | } |
|
449 | } |
|
450 |
@@ 96-116 (lines=21) @@ | ||
93 | /** |
|
94 | * @return QuestionHelper|DialogHelper |
|
95 | */ |
|
96 | private function getQuestionHelper() |
|
97 | { |
|
98 | // NEXT_MAJOR: Remove this BC code for SensioGeneratorBundle 2.3/2.4 after dropping support for Symfony 2.3 |
|
99 | if (class_exists('Sensio\Bundle\GeneratorBundle\Command\Helper\DialogHelper')) { |
|
100 | $questionHelper = $this->getHelper('dialog'); |
|
101 | ||
102 | if (!$questionHelper instanceof DialogHelper) { |
|
103 | $questionHelper = new DialogHelper(); |
|
104 | $this->getHelperSet()->set($questionHelper); |
|
105 | } |
|
106 | } else { |
|
107 | $questionHelper = $this->getHelper('question'); |
|
108 | ||
109 | if (!$questionHelper instanceof QuestionHelper) { |
|
110 | $questionHelper = new QuestionHelper(); |
|
111 | $this->getHelperSet()->set($questionHelper); |
|
112 | } |
|
113 | } |
|
114 | ||
115 | return $questionHelper; |
|
116 | } |
|
117 | } |
|
118 |