j6s/flow-transliterated-routes
Composer 安装命令:
composer require j6s/flow-transliterated-routes
包简介
Small package that ties in behat/transliterator with flows IdentityRoutePart to create smart international slugs
README 文档
README
Small package that ties behat/transliterator into the default behaviour of IdentityRoutePart of the Flow Framework to create smart international slugs.
Installation
$ composer require j6s/flow-transliterated-routes
Example Routes.yaml
- name: 'My.News:DetailPage' uriPattern: '{article}' routeParts: article: handler: 'J6s\TransliteratedRoutes\IdentityRoutePart' options: objectType: 'My\News\Domain\Model\Article' uriPattern: '{name}-{urlIdentifier}' replacements: '&': 'and' '|': 'or'
Configuration
All configuration from the default IdentityRoutePart has been retained with the notable difference, that they are shifted into the options key.
Additionally the following options exist:
additionalReplacements: Map of replacement that uses the character that should be replaced and it's replacement as a value. In order to be backwards-compatible with Flows defaultIdentityRoutePartthis defaults to replacements for german special characters. If you add replacements of your own and whish to retain german special characters, you have to add them to the map manually.
统计信息
- 总下载量: 33.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-08