承接 dartmoon/prestashop-tabmanager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dartmoon/prestashop-tabmanager

Composer 安装命令:

composer require dartmoon/prestashop-tabmanager

包简介

Library to easy the creation of backoffice menu tabs for PrestaShop

README 文档

README

A simple package that allows you to add your controllers to the PrestaShop Backoffice menu. Simply define an array with all the menu items and let the package install them.

Installation

  1. Install the package
composer require dartmoon/prestashop-tabmanager
  1. Define an array called menu_tabs inside the main class of your module
//...
protected $menu_tabs = [
    //
];
//...
  1. Fix install and unistall method of your module
//...
public function install()
{
    if (
        parent::install()
        && TabManager::install($this->menu_tabs, $this)
        // && $this->registerHook(...)
    ) {
        //...

        return true;
    }

    return false;
}

public function uninstall()
{
    //...
    TabManager::uninstallForModule($this);
    return parent::uninstall();
}
//...

Usage

Simply add all the menu items to the menu_tabs array.

protected $menu_tabs = [
    [// This is a parent tab
        'name' => 'Parent tab',
        'class_name' => 'UNIQUE_TAB_NAME',
        'route_name' => '',
        'parent_class_name' => '',
        'icon' => 'settings',
        'visible' => true,
    ],
    [ // This a child of the previus tab
        'name' => 'Child tab',
        'class_name' => 'MySuperClass', // Remember that the controller class name is MySuperClassController, but we need to add it without the suffix "Controller"
        'route_name' => '',
        'parent_class_name' => 'UNIQUE_TAB_NAME',
        'icon' => '',
        'visible' => true,
    ],
];

License

This project is licensed under the MIT License - see the LICENSE.md file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固