imatic / controller-bundle
Bundle to write simple controllers
Installs: 4 427
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: ^7.4 || ^8.0
- ext-iconv: *
- imatic/data-bundle: ^5.0|^6.0
- symfony/form: ^4.4 || ^5.4 || ^6.2
- symfony/framework-bundle: ^4.4 || ^5.4 || ^6.2
- symfony/mime: ^4.4 || ^5.4 || ^6.2
- symfony/translation: ^4.4 || ^5.4 || ^6.2
- symfony/twig-bundle: ^4.4 || ^5.4 || ^6.2
Requires (Dev)
- ext-json: *
- doctrine/doctrine-fixtures-bundle: ^3.3
- doctrine/orm: ^2.7
- friendsofphp/php-cs-fixer: ^3.11
- imatic/testing: ^6.0.0
- phpmd/phpmd: ^2.6
- symfony/browser-kit: ^4.4 || ^5.4 || ^6.2
- symfony/css-selector: ^4.4 || ^5.4 || ^6.2
- symfony/phpunit-bridge: ^4.4 || ^5.4 || ^6.2
- symfony/security-bundle: ^4.4 || ^5.4 || ^6.2
- symfony/validator: ^4.4 || ^5.4 || ^6.2
- symfony/web-profiler-bundle: ^4.4 || ^5.4 || ^6.2
- symfony/yaml: ^4.4 || ^5.4 || ^6.2
Suggests
- imatic/importexport-bundle: Allows to use import and export apis
- dev-master
- v5.0.7
- v5.0.6
- v5.0.5
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- v4.0.1
- v4.0
- v3.0.8
- v3.0.7
- v3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0
- 2.6.13
- 2.6.12
- 2.6.11
- 2.6.10
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.4.0
- dev-dependabot/composer/symfony/security-http-5.4.47
- dev-php8
- dev-dev-5.0
- dev-dev_update
- dev-travis
This package is auto-updated.
Last update: 2025-03-13 19:10:41 UTC
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.