定制 tbn/apigenerator-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tbn/apigenerator-bundle

Composer 安装命令:

composer require tbn/apigenerator-bundle

包简介

Get an ajax crud api out of the box

README 文档

README

This bundle is not maintained anymore, if you are looking for an API out of the box, please check https://github.com/api-platform/api-platform

Installation

	composer require "tbn/apigenerator-bundle"

Enable the bundle in the AppKernel for the dev environment

	...
	new tbn\ApiGeneratorBundle\ApiGeneratorBundle();
   ...

Add routing

	tbn_api_generator:
	    resource: "@ApiGeneratorBundle/Resources/config/routing.yml"

Add routing for development environment

	tbn_api_generator_dev:
	    resource: "@ApiGeneratorBundle/Resources/config/routing_dev.yml"

Configuration

	api_generator:
	    default: #The default behaviour for all entities
	        create: false #optionnal
	        update: false #optionnal
	        delete: false #optionnal
	        get_one: false      #optionnal #get one entity (only foreign keys are sent)
	        get_one_deep: false #optionnal #get one entity but the foreign entities are completed normalized too
	        get_all: false      #optionnal #get all entities
	        get_all_deep: false #optionnal #get all entities but the foreign entities are completed normalized too
	    entity:  #Specify the rights for specific entities
                    user: #the entity alias
                        class: "FrontBundle\\Entity\\SomeEntity" #mandatory
	            create: true  #optionnal
	            update: false #optionnal
	            delete: true  #optionnal
	            get_one: true #optionnal
	            get_one_deep: true #optionnal
	            get_all: true #optionnal
	            get_all_deep: true #optionnal

Usage

Go to the url:

	htpp://your_app/_apigenerator-configuration

It displays the entities and the rights associated for the Api Generator

TODO

Persist OneToMany collections

Remove entities

统计信息

  • 总下载量: 439
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-08-19