Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Sep 27, 2022
1 parent c332e40 commit 1df6da8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 13 additions & 1 deletion src/Block/Breadcrumb/BaseBreadcrumbMenuBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
use Knp\Menu\ItemInterface;
use Sonata\BlockBundle\Block\BlockContextInterface;
use Sonata\BlockBundle\Block\Service\AbstractMenuBlockService;
use Sonata\BlockBundle\Meta\Metadata;
use Sonata\BlockBundle\Meta\MetadataInterface;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\OptionsResolver\OptionsResolver;
Expand Down Expand Up @@ -48,10 +50,20 @@ public function configureSettings(OptionsResolver $resolver): void
]);
}

/**
* NEXT_MAJOR: Remove this method.
*/
public function getMetadata(): MetadataInterface
{
return new Metadata('sonata.block.service.menu', null, null, 'SonataBlockBundle', [
'class' => 'fa fa-bars',
]);
}

protected function getFormSettingsKeys(): array
{
return array_merge(
parent::getFormSettingsKeys(), // TODO: Remove the menu_template
parent::getFormSettingsKeys(),
[
['include_homepage_link', CheckboxType::class, [
'required' => false,
Expand Down
2 changes: 0 additions & 2 deletions tests/Block/Breadcrumb/BreadcrumbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public function testDefaultSettings(): void
'first_class' => false,
'last_class' => false,
'current_uri' => null,
'menu_class' => 'list-group',
'children_class' => 'list-group-item',
'menu_template' => '@SonataSeo/Block/breadcrumb.html.twig',
'include_homepage_link' => true,
'context' => null,
Expand Down

0 comments on commit 1df6da8

Please sign in to comment.