PhpSchool\CliMenu\MenuItem\SelectableItem::__construct PHP Method

__construct() public method

public __construct ( string $text, callable $selectAction, boolean $showItemExtra = false, boolean $disabled = false )
$text string
$selectAction callable
$showItemExtra boolean
$disabled boolean
    public function __construct($text, callable $selectAction, $showItemExtra = false, $disabled = false)
    {
        Assertion::string($text);
        $this->text = $text;
        $this->selectAction = $selectAction;
        $this->showItemExtra = (bool) $showItemExtra;
        $this->disabled = $disabled;
    }