Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stepapo authored Jun 18, 2021
1 parent 3431b26 commit 0293453
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ Let's create a menu with three links. Administration link is hidden for non-admi

```neon
buttons:
-
label: Homepage
destination: Home:default
-
label: About us
destination: About:default
-
label: Administration
destination: Admin:default
hide: %hideAdmin%
-
label: Homepage
destination: Home:default
-
label: About us
destination: About:default
-
label: Administration
destination: Admin:default
hide: %hideAdmin%
```

### Component

```php
public function createComponentMainMenu()
{
return Stepapo\Menu\UI\Menu::createFromNeon(__DIR__ . '/mainMenu.neon', [
'hideAdmin' => !$this->user->isInRole('admin')
]);
return Stepapo\Menu\UI\Menu::createFromNeon(__DIR__ . '/mainMenu.neon', [
'hideAdmin' => !$this->user->isInRole('admin')
]);
}
```

Expand All @@ -45,11 +45,11 @@ public function createComponentMainMenu()

```neon
buttons:
- # include Button configuration
- # include Button configuration
- # include Button configuration
- # include Button configuration
actions:
- # include Button configuration
- # include Button configuration
- # include Button configuration
- # include Button configuration
templateFile:
translator:
```
Expand All @@ -67,7 +67,7 @@ ajax:
history:
hide:
buttons:
- # include Button configuration
- # include Button configuration
- # include Button configuration
- # include Button configuration
```

0 comments on commit 0293453

Please sign in to comment.