Skip to content

Commit

Permalink
Fix badge class in extra to be underscore.
Browse files Browse the repository at this point in the history
  • Loading branch information
isometriks committed May 20, 2016
1 parent 9fbd74e commit da551d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Menu/Factory/MenuDecorator.php
Expand Up @@ -92,7 +92,7 @@ public function buildItem(ItemInterface $item, array $options)
}

if ($options['badge-class']) {
$item->setExtra('badge-class', $options['badge-class']);
$item->setExtra('badge_class', $options['badge-class']);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Resources/views/Menu/menu.html.twig
Expand Up @@ -10,7 +10,7 @@
{{ block('label') }}
{% import 'MopaBootstrapBundle::macros.html.twig' as badgemacro %}
{%- if item.extras.badge|default(false) %}
{{ badgemacro.badge(item.extras.badge, false, item.extras.badge-class|default('menu-badge')) }}
{{ badgemacro.badge(item.extras.badge, false, item.extras.badge_class) }}
{% endif -%}
{%- if item.extras.caret|default(false) %}
<b class="caret"></b>
Expand Down

0 comments on commit da551d4

Please sign in to comment.