定制 m-adamski/symfony-breadcrumbs-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

m-adamski/symfony-breadcrumbs-bundle

Composer 安装命令:

composer require m-adamski/symfony-breadcrumbs-bundle

包简介

The Symfony Bundle, which simplifies the process of generating and displaying breadcrumbs

README 文档

README

The Symfony Bundle, which simplifies the process of generating and displaying breadcrumbs. Compared to previous versions, this one is based on simple methods of creating and adding breadcrumbs.

Installation

Composer can install this bundle:

$ composer require m-adamski/symfony-breadcrumbs-bundle

How to use it?

namespace App\Controller;

use App\Model\Breadcrumbs\Breadcrumb;
use App\Model\Breadcrumbs\Catalog as BreadcrumbsCatalog;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

class DashboardController extends AbstractController {
    public function __construct(
        private readonly BreadcrumbsCatalog $breadcrumbsCatalog,
    ) {}

    #[Route("/dashboard", name: "dashboard", methods: ["GET"])]
    public function index(): Response {
        $this->breadcrumbsCatalog->getDefaultContainer()
            ->add((new Breadcrumb("Dashboard"))->setRoute("dashboard"));

        return $this->render("modules/Dashboard/index.html.twig");
    }
}

The custom Twig function is responsible for displaying breadcrumbs:

<section class="breadcrumbs-container">
    {{ breadcrumbs() }}
</section>

License

MIT

统计信息

  • 总下载量: 970
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固