numero2 / contao-storelocator
Contao 插件,用于管理门店(或常用地址数据)并提供基于地理数据的前端搜索
v4.3.5
2024-08-29 13:35 UTC
Requires
- contao/core-bundle: ^4.13 || ^5.0
- doctrine/dbal: ^3.3 || ^3.6
- geocoder-php/google-maps-provider: ^4.6
- psr/http-client: ^1.0
- psr/log: ^1.1 || 2.0 || ^3.0
- symfony/config: ^5.4 || ^6.4 || ^7.0
- symfony/dependency-injection: ^5.4 || ^6.4 || ^7.0
- symfony/event-dispatcher: ^5.4 || ^6.4 || ^7.0
- symfony/event-dispatcher-contracts: ^2.0 || ^3.0
- symfony/filesystem: ^5.4 || ^6.4 || ^7.0
- symfony/http-foundation: ^5.4 || ^6.4 || ^7.0
- symfony/http-kernel: ^5.4 || ^6.4 || ^7.0
- symfony/translation-contracts: ^2.3 || ^3.0
- willdurand/geocoder: ^4.3
Requires (Dev)
Suggests
- geocoder-php/bing-maps-provider: For use of Bing Maps as geocode provider
- geocoder-php/here-provider: For use of HERE Maps as geocode provider
- geocoder-php/nominatim-provider: For use of OpenStreetMap Nominatim as geocode provider
- geocoder-php/open-cage-provider: For use of OpenCage as geocode provider
- numero2/contao-tags: Allows the tagging of stores
Conflicts
- contao/core: *
- contao/manager-plugin: <2.0 || >=3.0
README
关于
此扩展提供创建包含地址数据、联系信息和营业时间的多个列表的可能性。用户可以从前端输入任何可能的地址,查看附近的门店(类似于谷歌地图)。了解更多
屏幕截图
系统要求
- Contao 4.13 或更高版本
- Google API 密钥
安装
- 通过 Contao Manager 或 Composer 安装(
composer require numero2/contao-storelocator
) - 通过 Contao-Installtool 或使用 contao:migrate 命令运行数据库更新。
使用其他提供商
StoreLocator 默认捆绑了 Google Maps 提供商。如果您想使用其他提供商,则需要安装额外的包
事件
默认情况下,导入器将使用文件第一行提供的键填充模型当前行的字段。对于自定义处理,请使用 contao.storelocator_store_import
事件。
// src/EventListener/StoreImportListener.php namespace App\EventListener; use numero2\StoreLocatorBundle\Event\StoreImportEvent; use numero2\StoreLocatorBundle\Event\StoreLocatorEvents; use Symfony\Component\EventDispatcher\Attribute\AsEventListener; #[AsEventListener(StoreLocatorEvents::STORE_IMPORT)] class StoreImportListener { public function __invoke( StoreImportEvent $event ): void { // … } }