kematjaya / breadcrumb-bundle
Installs: 1 899
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- doctrine/collections: ^1.5
- symfony/framework-bundle: ^4.0|^5.0
- symfony/templating: ^4.0|^5.0
- symfony/translation: ^4.0|^5.0
- symfony/twig-bundle: ^4.0|^5.0
- twig/twig: ^2.0|^3.0
Requires (Dev)
- phpunit/phpunit: ^6.4
- symfony/browser-kit: ^4.0
README
- instalation
composer require kematjaya/breadcrumb-bundle
- update config/bundles.php
Kematjaya\Breadcrumb\KmjBreadcrumbBundle::class => ['all' => true]
- usage in controller
namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Kematjaya\Breadcrumb\Lib\Builder as BreacrumbBuilder; use Symfony\Component\Routing\Annotation\Route; /** * @Route("/item") */ class MyController extends AbstractController { /** * @Route("/", name="item_index") */ public function index(BreacrumbBuilder $builder) { $builder->add('item'); .... } /** * @Route("/create", name="item_create") */ public function create(BreacrumbBuilder $builder) { $builder->add('item', 'item_index'); $builder->add('create'); ... } }
- use in twig
<div class="pull-right"> {{ kmj_breadcrumb() }} </div>