Skip to content

Commit

Permalink
Item extra and marker notes
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinHassan committed May 14, 2018
1 parent ddb5cd9 commit 134a317
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ The outcome is a full menu with dimmed rows to denote them being disabled. When
#### Item Markers

The marker displayed by the side of the currently active item can be modified, UTF-8 characters are supported.
The marker for un-selected items can also be modified. If you want to disable it, just set it to a space character.
The marker for un-selected items can also be modified. If you want to disable it, just set it to a space character. Item
markers only display on *selectable* items, which are: `\PhpSchool\CliMenu\MenuItem\SelectableItem` & `\PhpSchool\CliMenu\MenuItem\MenuMenuItem`.

```php
$menu = (new CliMenuBuilder)
Expand All @@ -595,7 +596,9 @@ $menu = (new CliMenuBuilder)

You can optionally display some arbitrary text on the right hand side of an item. You can customise this text and
you indicate which items to display it on. We use it to display `[COMPLETED]` on completed exercises, where the menu lists
exercises for a workshop application.
exercises for a workshop application.

Item Extra is currently limited to only `\PhpSchool\CliMenu\MenuItem\SelectableItem`.

The third parameter to `addItem` is a boolean whether to show the item extra or not. It defaults to false.

Expand Down

0 comments on commit 134a317

Please sign in to comment.