imatic/controller-bundle
最新稳定版本:v5.0.7
Composer 安装命令:
composer require imatic/controller-bundle
包简介
Bundle to write simple controllers
关键字:
README 文档
README
ImaticControllerBundle
This bundle makes it easy to write simple controllers for all kinds of actions. It heavilly uses ImaticDataBundle. So you you should read it's documentation first if you didn't yet.
The bundle allows you to write simple actions in 2 forms
- using fluent interface
<?php use Imatic\Bundle\ControllerBundle\Controller\Api\ApiTrait; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Routing\Annotation\Route; /** * @Route("/user") */ class UserController extends Controller { use ApiTrait; /** * @Route("", name="app_user_list", methods={"GET"}) */ public function listAction() { return $this ->listing(new UserListQuery()) ->setTemplateName('AppImaticControllerBundle:Test:list.html.twig') ->getResponse(); } }
- using yaml
imatic_controller: resources: app_user_list: config: route: { path: /user } entity: User query: list: UserListQuery fields: - { name: name, format: text } - { age: age, format: number } actions: list: ~
Further reading
- Visit our documentation to learn about all features of this bundle.
统计信息
- 总下载量: 5.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-07