k3soft / fos-user-bridge-bundle
此包已被弃用,不再维护。未建议替代包。
此包最新版本(dev-master)没有可用的许可证信息。
空
dev-master
2016-10-12 14:55 UTC
Requires
- php: >=7.0
- friendsofsymfony/rest-bundle: 2.1.*
- friendsofsymfony/user-bundle: 2.0.*@dev
This package is auto-updated.
Last update: 2018-09-24 09:38:22 UTC
README
<待完成:解释路由导入>
入门
该捆绑包是 FOSUserBundle 和 FOSRestBundle 之间的桥梁。允许您通过 REST API 使用标准 FOSUserBundle 的功能。
安装
将 k3soft/fos-user-bridge-bundle 添加到您的 composer.json 文件中
composer require "k3soft/fos-user-bridge-bundle"
配置 FOSUserBundle 和 FOSRestBundle。
在 app/AppKernel.php 中注册捆绑包
public function registerBundles() { return array( // ... new K3Soft\Bundle\FOSUserBridgeBundle\K3SoftFOSUserBridgeBundle(), ); }
要获得此捆绑包的全部功能,您必须扩展 K3Soft\Bundle\FOSUserBridgeBundle\Model\User 类而不是 FOS\UserBundle\Model\User 类。
配置
k3_soft_fos_user_bridge: profile: form: type: K3Soft\Bundle\FOSUserBridgeBundle\Form\Type\ApiProfileFormType name: apiProfileForm validation_groups: [Profile, Default] registration: form: type: K3Soft\Bundle\FOSUserBridgeBundle\Form\Type\ApiRegistrationFormType name: apiRegistrationForm validation_groups: [Registration, Default]