We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c799acf + c1d5166 commit 64d6d13Copy full SHA for 64d6d13
src/CliMenuBuilder.php
@@ -84,7 +84,9 @@ class CliMenuBuilder
84
public function __construct(CliMenuBuilder $parent = null)
85
{
86
$this->parent = $parent;
87
- $this->terminal = TerminalFactory::fromSystem();
+ $this->terminal = $this->parent !== null
88
+ ? $this->parent->getTerminal()
89
+ : TerminalFactory::fromSystem();
90
$this->style = MenuStyle::getDefaultStyleValues();
91
}
92
@@ -269,6 +271,11 @@ public function setTerminal(Terminal $terminal) : self
269
271
return $this;
270
272
273
274
+ public function getTerminal() : Terminal
275
+ {
276
+ return $this->terminal;
277
+ }
278
+
279
private function getDefaultItems() : array
280
281
$actions = [];
0 commit comments