定制 altamash80/dynamic-bootstrap-menu-laminasmvc-doctrine 二次开发

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

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

altamash80/dynamic-bootstrap-menu-laminasmvc-doctrine

最新稳定版本:1.2.0

Composer 安装命令:

composer require altamash80/dynamic-bootstrap-menu-laminasmvc-doctrine

包简介

Create dynamic menus via doctrine in Laminas MVC.

README 文档

README

Create dynamic menus via doctrine in Laminas MVC.

Installation without LmcRbacMvc

composer require altamash80/laminas-mvc-bootstrap-menu:"1.0.0"
composer require altamash80/dynamic-bootstrap-menu-laminasmvc-doctrine

Installation with LmcRbacMvc

composer require altamash80/laminas-mvc-bootstrap-menu:"1.1.0"
composer require altamash80/dynamic-bootstrap-menu-laminasmvc-doctrine

Dependency

  1. Doctrine
  2. Navigation
  3. Lrphpt Menu
  4. Laminas MVC(minimum)

Add Module in module config file

Add the module name in module.config.php.

return[
    'Laminas\Navigation',
    'Lrphpt',
    'LRPHPT\MenuTree',
    'Application',
];

Run the command line below to create and execute migration. To set up migration check this link.

./vendor/bin/doctrine-module migrations:diff
./vendor/bin/doctrine-module migrations:execute

Mandatory check

  1. Copy the pickletree javscript folder and paste it in public folder.
  2. Make sure you've echo $this->inlineScript() in your layout.phtml file or any layout file you're using.

Access in browser

yourhost/lrphpt-menu

Create a root menu for access as shown below.

lrphpt-menu-landing-screen

After creating the root menu, start building the actual menu items as shown in the image below.

lrphpt-menu-tree-example

lrphpt-menu-tree-example2

Usage

Add the below line in any layout.phtml file.

<?=$this->navigation('lrphpt_navigation')
                    ->bootstrapMenu()
                    ->setUlClass('navbar-nav')
                    // Optional setting to use with LmcRbac route guard.
                    //->setAuthorizationService($this->LmcRbacAuthorizationServiceHelper())
                    ; ?>

Use the below configuration first by creating a navigation factory with someother_navigation. See this link. Then write the below lines in the class file.

public function getName(){
   return 'footer-menu';
}

<?=$this->navigation('someother_navigation')
                    ->bootstrapMenu()
                    ->setUlClass('navbar-nav')
                    // Optional setting to use with LmcRbac route guard.
                    //->setAuthorizationService($this->LmcRbacAuthorizationServiceHelper())
                    ; ?>

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-11-10