pixelmairie/sulu-townhallbundle
Composer 安装命令:
composer require pixelmairie/sulu-townhallbundle
包简介
Manage town hall for Sulu CMS
README 文档
README
Town Hall Bundle for Sulu CMS
📝 Presentation
A Sulu bundle to manage town hall related entities.
✅ Features
- Report management
- Bulletin management
- Procedure management
- Decree management
- List of entities (via smart content)
- Preview
- Translation
- Settings
- SEO
- Activity log
- Trash
- Automation
- Search
🚀 Installation
Install the bundle
Execute the following composer command to add the bundle to the dependencies of your project:
composer require pixelmairie/sulu-townhallbundle
Enable the bundle
Enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:
return [ /* ... */ Pixel\TownHallBundle\TownHallBundle::class => ['all' => true], ];
Update schema
bin/console do:sch:up --force
Bundle Config
Define the Admin Api Route in routes_admin.yaml
townhall.settings_api: type: rest prefix: /admin/api resource: pixel_townhall.settings_route_controller name_prefix: townhall. townhall.reports_api: type: rest prefix: /admin/api resource: pixel_townhall.reports_route_controller name_prefix: townhall. townhall.bulletins_api: type: rest prefix: /admin/api resource: pixel_townhall.bulletins_route_controller name_prefix: townhall. townhall.procedures_api: type: rest prefix: /admin/api resource: pixel_townhall.procedures_route_controller name_prefix: townhall. townhall.decrees_api: type: rest prefix: /admin/api resource: pixel_townhall.decrees_route_controller name_prefix: townhall.
👍 Use
This bundle has a lot of different parts:
- Report: the reports of the municipal council
- Bulletin: town hall bulletins about the city life for example
- Procedure: the different procedures available in the town hall (ID card, passport, driving licence, ...)
- Decree: the municipal or prefectoral decrees
The following sections will present globally how to interact with the bundle as it is the same for each entity. When needed, a more specific presentation will be done.
Add/Edit
Go to the "Town hall" section in the administration interface. Then, click on the subsection you wish to intervene. To add, simply click on "Add". Fill the fields that are needed for your use.
The fields depend on the subsection you want to edit.
Report:
- Title
- Date (mandatory)
- PDF file
- Description
Bulletin:
- Title (mandatory)
- Date (mandatory)
- Cover
- PDF file
- Description
Procedure:
- Title (mandatory)
- URL (mandatory and filled automatically according to the title)
- Cover
- PDF file
- External link
- Category (mandatory)
- Description (mandatory)
Decree:
- Title (mandatory)
- Start date (mandatory)
- End date
- PDF file (mandatory)
- Type of decree (mandatory)
- Description
Once you finished, click on "Save".
The entity you added is not visible on the website yet. In order to do that, click on "Activate?" or "Published?. It should be now visible for visitors.
To edit, simply click on the pencil at the left of the entity you wish to edit.
Some of these entities have a preview:
- Procedure
Categories
As you may have seen in the previous section, some entities need a category, a type or a status. These categories, types and status need to be created in a very specific way.
For the categories:
- You must create a root category which must have its key named "procedures"
- Then, under this root category, you create all the categories you need
For the type:
- You must create a root category which must have its key named "decrees"
- Then, under this root category, you create all the categories you need
Remove/Restore
There are two ways to remove a town hall entity:
- Check every entity you want to remove and then click on "Delete"
- Go to the detail of an entity (see the "Add/Edit" section) and click on "Delete".
In both cases, the entity will be put in the trash.
To access the trash, go to the "Settings" and click on "Trash". To restore an entity, click on the clock at the left. Confirm the restore. You will be redirected to the detail of the entity you restored.
To remove permanently an entity, check all the entities you want to remove and click on "Delete".
Settings
This bundle comes with settings. To access the bundle settings, go to "Settings > Town hall management".
Here is the list of the different settings:
- Town hall name
- Weather
The weather setting is a textarea in which you can put HTML in order to use the weather service iframe.
Here is an example of how to use the settings:
<?php namespace Pixel\TownHallBundle\Controller\Website; use Doctrine\ORM\EntityManagerInterface; use Pixel\TownHallBundle\Entity\Setting; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Annotation\Route; class MeteoController extends AbstractController { /** * @Route("meteo", name="meteo", options={"expose"=true}, methods={"POST"}) */ public function meteo(EntityManagerInterface $entityManager): JsonResponse { $setting = $entityManager->getRepository(Setting::class)->find(1); return new JsonResponse([ "success" => true, "template" => $setting->getMeteo(), ]); } }
🤝 Contributing
You can contribute to this bundle. The only thing you must do is respect the coding standard we implement.
You can find them in the ecs.php file.
pixelmairie/sulu-townhallbundle 适用场景与选型建议
pixelmairie/sulu-townhallbundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 243 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 06 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sulu」 「sulucms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pixelmairie/sulu-townhallbundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pixelmairie/sulu-townhallbundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pixelmairie/sulu-townhallbundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bundle for creating forms in Sulu.
The bundle provides command to migrate the Sulu database from phpCr to the SuluContentBundle.
Simple News Bundle for Sulu 2 CMS
Package to generate configuration and boilerplate code in Sulu
Manage news for Sulu
SuluArticleTwigExtensionFilterBundle extends the Sulu CMS to enable article retrieval in TWIG without ElasticSearch
统计信息
- 总下载量: 243
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 21
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-30