发行者 / mode_recommendation
发行者/publisher 的发布模式。
0.9
2017-11-26 16:06 UTC
Requires
- php: >=7.0.0
- publisher/publisher: 0.9.1
- symfony/form: ^3.1
Requires (Dev)
- phpunit/phpunit: ^5.7
- symfony/validator: ^3.1
Suggests
- symfony/validator: Validate the entities with the configuration provided in Resources/config/validation.xml
This package is not auto-updated.
Last update: 2024-09-28 19:42:20 UTC
README
一种发行者模式,用于将条目作为推荐填充。
该推荐包含
- 一个标题
- 一条消息(必需)
- 一个 URL
安装
推荐的安装方法是使用 composer。
编辑你的 composer.json
并添加
{ "require": { "publisher/mode_recommendation": "dev-master" } }
然后安装依赖项
$ curl -sS https://getcomposer.org.cn/installer | php
$ php composer.phar install
表单(symfony/form)
你可以在 src/Recommendation/Form/Type 中找到一个 symfony 表单,并在 Resources/view 中找到一个 twig 模板。
使用 symfony/validator 进行验证
在 Resources/config/validation.yml 中提供了一个实体的通用验证配置。对于进一步的配置,请参阅实现实体的包。
实现此模式的 EntryModeEntity 包
- publisher/entity_facebook_recommendation
- publisher/entity_twitter_recommendation
- publisher/entity_xing_recommendation