flexix / prototype-controller-bundle
Symfony Flexix bundle
Installs: 71
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5.9
- flexix/controller-configuration-bundle: dev-master
- flexix/mapper-bundle: dev-master
- friendsofsymfony/rest-bundle: 2.1.1
- jms/serializer-bundle: 2.*
- symfony/framework-bundle: 3.*
Requires (Dev)
- phpunit/phpunit: 6.*
This package is not auto-updated.
Last update: 2024-11-22 12:44:56 UTC
README
We are still working on it! (so hard :))
Flexix\PrototypeControllerBundle
by Mariusz Piela mariusz.piela@tmsolution.pl
Installation
To install the bundle, add:
//composer require
"flexix/prototype-controller-bundle": "dev-master"
to your project's composer.json
file. Later, enable your bundle in the app's kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Flexix\MapperBundle\FlexixMapperBundle(),
new Flexix\PrototypeControllerBundle\FlexixPrototypeControllerBundle()
);
}
Creating configuration for Controller
- Creaete Configuration
parameters:
some_controller.config:
#for all actions
base:
allowed: true # you can put array with values xhttp or subrequest
models:
get:
name: 'some.service.name'
method: someMethod
actions:
#for 'new' action
new:
templates:
widget: 'some_template.html.twig'
models:
create:
name: 'some.service.name'
method: someMethod
form:
action: new
form_type: 'Some\FormTypeClass'
redirection:
route_name: filter #route name
#for 'list' action
list:
allowed: #only xhttp and subrequest possible
- xhttp
- subrequest
templates:
widget: 'some_template.html.twig'
models:
list:
name: 'some.service.name'
method: someMethod
form:
form_type: 'Some\FormTypeClass'
action: list
method: GET
adapter: 'some.adapter.service'
#and so on ....
- Create service
services:
some_service_name:
class: Flexix\ConfigurationBundle\Util\Configuration
arguments: [%some_controller.config%]
tags:
- { name: flexix_prototype_controller.controller_configuration, applicationPath: 'some/path', entity_alias: 'entity-alias' }
For more information read: how to start