2017 © Pedro Peláez
 

library console

Menu helper for Symfony Console component

image

redant/console

Menu helper for Symfony Console component

  • Sunday, March 11, 2018
  • by cinamo
  • Repository
  • 3 Watchers
  • 15 Stars
  • 189 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 93 % Grown

The README.md

RedAnt Console

This menu helper is a bridge for PHPSchool's CliMenu library, so that it can easily be used inside the Symfony Console., (*1)

It provides an interactive menu that you can navigate using the arrow and enter keys., (*2)

Only compatible with UNIX tty-style terminals., (*3)

Installation

Install through composer require redant/console., (*4)

Setup

Register the helper in your HelperSet:, (*5)

use RedAnt\Console\Helper\SelectHelper;

// Further on in your code ...
$this->getHelperSet()->set(new SelectHelper(), 'select');

Then you can start using the helper like this:, (*6)

$helper = $this->getHelper('select');
$value = $helper->select(
    $input,
    'What is your favorite food?',
    [
        'hamburger' => 'Hamburger',
        'pizza'     => 'Pizza',
        'sushi'     => 'Sushi',
        'poke'      => 'Poké bowl'
    ]
);

// $value = 'poke' when the fourth option was chosen
// $value = null when the user canceled

About

Lovingly crafted by RedAnt in Utrecht, NL., (*7)

This project is licensed under the terms of the MIT license., (*8)

The Versions

11/03 2018

dev-master

9999999-dev

Menu helper for Symfony Console component

  Sources   Download

MIT

The Requires

 

by Gert Wijnalda

11/03 2018

v1.0.1

1.0.1.0

Menu helper for Symfony Console component

  Sources   Download

MIT

The Requires

 

by Gert Wijnalda

30/03 2017

1.0.0

1.0.0.0

Menu helper for Symfony Console component

  Sources   Download

MIT

The Requires

 

by Gert Wijnalda