webundle/puzzle-admin-bundle
Composer 安装命令:
composer require webundle/puzzle-admin-bundle
包简介
Manage dashboard
关键字:
README 文档
README
Symfony project.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require webundle/puzzle-admin-bundle
Step 1: Enable bundles
Enable admin bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new JMS\DiExtraBundle\JMSDiExtraBundle($this), new JMS\AopBundle\JMSAopBundle(), new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), new Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new FOS\JsRoutingBundle\FOSJsRoutingBundle(), new Puzzle\AdminBundle\AdminBundle(), ); // ... } // ... }
Step 2: Define hosts values
Defined hosts values by adding it in the app/config/parameters.yml file of your project:
paremeters: ... host: <hostname> admin_host: 'admin.%host%' # or %host% if you don't use subdomain admin_prefix: '/' # or /admin/ if with you don't use subdomain
Step 3: Security
Configure security by adding it in the app/config/security.yml file of your project:
security: ... role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] firewalls: admin_login: pattern: ^%admi_prefix%login$ anonymous: ~ admin: entry_point: admin.security.authentication_entry_point pattern: '^%admin_prefix%' host: '%admin_host%' provider: chain_provider access_denied_handler: security.access_denied_handler form_login: check_path: login_check login_path: admin_login success_handler: security.authentication_success_handler failure_handler: security.authentication_failure_handler csrf_token_generator: security.csrf.token_manager logout: path: /logout target: admin_homepage delete_cookies: REMEMBERME: { path: null, domain: null} remember_me: secret: "%secret%" lifetime: 84400 path: admin_homepage domain: ~ always_remember_me: true ... access_control: - {path: ^%admin_prefix%login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - {path: ^%admin_prefix%, host: "%admin_host%", roles: ROLE_ADMIN }
Step 4: Register default routes
Register default routes by adding it in the app/config/routing.yml file of your project:
.... admin: resource: "@AdminBundle/Resources/config/routing.yml" host: '%admin_host%' options: expose: true fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
Step 5: Install bower components
Overwrite, bower install folder by creating .bowerrc file in project folder root and typing into it:
.... { "directory": "vendor/webundle/puzzle-admin-bundle/Puzzle/AdminBundle/Resources/public/libs/" }
Create bower.json file in project folder root and copy into it:
.... { "name": "webundle-puzzle-admin", "version": "1.0.0", "authors": [ "tzd" ], "description": "Webundle project", "main": [ "index.php", "assets/less/main.less", "assets/js/altair_admin_common.js" ], "keywords": [ "admin", "panel", "material", "design", "dashboard" ], "license": "http://themeforest.net/licenses", "homepage": "http://webundle.com", "private": true, "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ], "dependencies": { "autosize": "~3.0.8", "c3js-chart": "~0.4.10", "clndr": "~1.2.14", "codemirror": "~5.5.0", "countUp.js": "~1.5.3", "d3": "<=3.5.5", "datatables": "~1.10.7", "datatables-colvis": "~1.1.2", "datatables-tabletools": "~2.2.4", "dense": "*", "fastclick": "~1.0.6", "fitvids": "~1.1.0", "fullcalendar": "~2.3.2", "handlebars": "~3.0.3", "ionrangeslider": "~2.0.12", "jquery": "~2.1", "jquery-icheck": "~1.0.2", "jquery-mapael": "~1.0.1", "jquery-mousewheel": "~3.1.13", "jquery.dotdotdot": "~1.7.3", "jquery.inputmask": "~3.1.63", "jquery.easy-pie-chart": "~2.1.6", "jquery.scrollbar": "~0.2.7", "jquery-ui": "~1.11.4", "kendo-ui-core": "~2015.2.720", "magnific-popup": "~1.0.0", "maplace.js": "~0.1.33", "marked": "~0.3.3", "metrics-graphics": "~2.6.0", "modernizr": "~2.8.3", "moment": "~2.10.3", "parsleyjs": "~2.1.2", "peity": "~3.2.0", "prism": "gh-pages", "selectize": "~0.12.1", "switchery": "~0.8.1", "uikit": "~2.21.0", "velocity": "~1.2.1", "weather-icons": "~1.3.2", "jquery.actual": "~1.0.16", "jquery-bez": "~1.0.11", "waypoints": "~3.1.1", "materialize-tags": "^1.2.3", "fontawesome": "^4.0", "jquery-typeahead": "^2.10.6", "ckeditor": "^4.11.4" }, "resolutions": { "jquery": "~2.1", "fastclick": "~1.0.6" } }
In project folder root, install bower components by typing it in CLI:
bower install
Step 6: Default configurations
Configure admin bundle by adding it in the app/config/config.yml file of your project:
imports: - { resource: parameters.yml } - { resource: security.yml } parameters: locale: fr framework: #esi: ~ # default_locale: fr translator: fallbacks: ["%locale%"] secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } #serializer: { enable_annotations: true } templating: engines: ['twig'] default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: handler_id: ~ fragments: ~ http_method_override: true assets: version: 2 version_format: '%%s?version=%%s' base_path: ~ # Twig Configuration twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%" paths: '%kernel.root_dir%/../web': template # Assetic Configuration assetic: debug: "%kernel.debug%" use_controller: false java: /usr/bin/java filters: cssrewrite: ~ # Doctrine Configuration doctrine: dbal: driver: pdo_mysql host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: UTF8 orm: auto_generate_proxy_classes: "%kernel.debug%" naming_strategy: doctrine.orm.naming_strategy.underscore auto_mapping: true # Swiftmailer Configuration swiftmailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory } # Knp Paginator knp_paginator: page_range: 5 # default page range used in pagination control default_options: page_name: page # page query parameter name sort_field_name: sort # sort field query parameter name sort_direction_name: direction # sort direction query parameter name distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements # filter_field_name: filterField # filter field query parameter name # filter_value_name: filterValue # filter value query parameter name template: pagination: AppBundle:Pagination:sliding.html.twig # sliding pagination controls template sortable: AppBundle:Pagination:sortable_link.html.twig # sort link template filtration: AppBundle:Pagination:filtration.html.twig # filters template # Knp Doctrine Behaviors knp_doctrine_behaviors: blameable: true geocodable: ~ # Here null is converted to false loggable: ~ timestampable: true sluggable: true soft_deletable: true # Liip liip_imagine : ... filter_sets : ... # Logo naviagtion logo_navigation : quality : 100 filters : thumbnail : { size : [100, 100], mode : outbound } # Admin Configuration admin: website: title: 'Lorem ipsum dolor' # Customize with your own admin name description: 'Lorem ipsum dolor' # Customize with your own admin description email: 'johndoe@exemple.ci' # Customize with your own admin email time_format: "H:i" # customize time format see php.net time format date_format: "d-m-Y" # customize date format see php.net date format modules_available: 'admin' navigation: nodes: dashboard: label: 'admin.dashboard.navigation' translation_domain: 'admin' path: admin_homepage attr: class: 'fa fa-home' # customize icon class parent: ~ user_roles: ['ROLE_ADMIN']
Step 7: Launch admin install
In project folder root, type:
php bin/console puzzle:admin-install
webundle/puzzle-admin-bundle 适用场景与选型建议
webundle/puzzle-admin-bundle 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 06 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dashboard admin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 webundle/puzzle-admin-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webundle/puzzle-admin-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 webundle/puzzle-admin-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
A short description of what your package does
Scout support for MoonShine
Production-ready Laravel Prometheus metrics package with built-in collectors for HTTP, database, cache, queue, events, errors, filesystem, and mail monitoring
Laravel Package for integrating Tabler template and this package is Laravel Mix friendly.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-05