perspeqtive/sulu-snippet-manager-bundle
Composer 安装命令:
composer require perspeqtive/sulu-snippet-manager-bundle
包简介
Transform snippets in custom managers
README 文档
README
The Sulu Snippet Manager Bundle adds configurable snippet-based navigation items to the Sulu Admin interface. This allows you to organize snippets by type and permissions within the native Sulu Admin UI.
🚀 Features
- Custom navigation items for different snippet types
- Optional nested navigation items (e.g. under a main “Configuration” item)
- Independent permission handling per snippet type and snippet navigation item
- Easy custom snippet list view per snippet type
- Hide default snippet area with snippet types, where a certain permission is not given
🛠️ Installation
Install the bundle via composer:
composer require perspeqtive/sulu-snippet-manager-bundle
Enable the bundle
Register it in your config/bundles.php:
return [ // ... PERSPEQTIVE\SuluSnippetManagerBundle\SuluSnippetManagerBundle::class => ['all' => true], ];
🛠️ Configuration
Create a configuration file at config/packages/sulu_snippet_manager.yaml. Here you define how and where your snippet navigation items appear in the Sulu Admin UI.
Example configuration:
sulu_snippet_manager: navigation: configuration: navigation_title: "Configuration" type: "configuration" order: 39 icon: "su-news" children: settings: navigation_title: "Settings" type: "settings" order: 0 icon: "su-settings" list_view_key: "my-custom-view" account: navigation_title: "Account Settings" type: "account" order: 1 icon: "su-account" services: navigation_title: "Services" type: "services" order: 41 icon: "su-services"
Configuration keys explained:
| config item | required | description |
|---|---|---|
| navigation_title | yes | Label shown in the Sulu Admin navigation |
| type | yes | The snippet type, when it is not a nested parent item. When it is a parent item, just use an unique identifier |
| order | yes | Sort order position |
| icon | no | Sulu icon name (e.g. su-settings, see icon overview) |
| children | no | Nested navigation items — parent items with children act as groups without detail views, parents without children behave like normal list views |
| snippet_list_view | no | The custom list view xml, where the view is configured |
Permissions
Each snippet automatically receives its own permission key. These permissions are independent from the global snippet permissions in Sulu.
You can assign user roles to control access (view, add, edit, delete) to each snippet separately.
⚠️ Important: Users without the required permission won’t see the corresponding navigation item in the Sulu Admin UI.
👩🍳 Contribution
Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.
perspeqtive/sulu-snippet-manager-bundle 适用场景与选型建议
perspeqtive/sulu-snippet-manager-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.48k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2025 年 06 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「manager」 「navigation」 「permissions」 「sulu」 「snippet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 perspeqtive/sulu-snippet-manager-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 perspeqtive/sulu-snippet-manager-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 perspeqtive/sulu-snippet-manager-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Multiauth package
A block to display a list of links to child pages, or pages in current level
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
User permissions for MoonShine
KCFinder web file manager
Publish / Subscribe / Event Manager
统计信息
- 总下载量: 1.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-18