move to CL => Chill namespace

This commit is contained in:
Julien Fastré 2014-10-29 21:29:00 +01:00
parent 26a0b1e056
commit 103f5c414e
91 changed files with 364 additions and 364 deletions

View File

@ -16,7 +16,7 @@ class AppKernel extends Kernel
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new CL\CustomFieldsBundle\CLCustomFieldsBundle(),
new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {

View File

@ -1,4 +1,4 @@
cl_custom_fields:
resource: "@CLCustomFieldsBundle/Resources/config/routing.yml"
resource: "@ChillCustomFieldsBundle/Resources/config/routing.yml"
prefix: /

View File

@ -1,20 +0,0 @@
cl_custom_fields_customfieldsgroup:
resource: "@CLCustomFieldsBundle/Resources/config/routing/customfieldsgroup.yml"
prefix: /customfieldsgroup
cl_custom_fields_blopentity2:
resource: "@CLCustomFieldsBundle/Resources/config/routing/blopentity2.yml"
prefix: /blopentity2
cl_custom_fields_adress:
resource: "@CLCustomFieldsBundle/Resources/config/routing/adress.yml"
prefix: /adress
cl_custom_fields_customfield:
resource: "@CLCustomFieldsBundle/Resources/config/routing/customfield.yml"
prefix: /customfield
cl_custom_fields_blopentity:
resource: "@CLCustomFieldsBundle/Resources/config/routing/blopentity.yml"
prefix: /

View File

@ -1,30 +0,0 @@
adress:
path: /
defaults: { _controller: "CLCustomFieldsBundle:Adress:index" }
adress_show:
path: /{id}/show
defaults: { _controller: "CLCustomFieldsBundle:Adress:show" }
adress_new:
path: /new
defaults: { _controller: "CLCustomFieldsBundle:Adress:new" }
adress_create:
path: /create
defaults: { _controller: "CLCustomFieldsBundle:Adress:create" }
requirements: { _method: post }
adress_edit:
path: /{id}/edit
defaults: { _controller: "CLCustomFieldsBundle:Adress:edit" }
adress_update:
path: /{id}/update
defaults: { _controller: "CLCustomFieldsBundle:Adress:update" }
requirements: { _method: post|put }
adress_delete:
path: /{id}/delete
defaults: { _controller: "CLCustomFieldsBundle:Adress:delete" }
requirements: { _method: post|delete }

View File

@ -1,42 +0,0 @@
blopentity:
path: /
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:index" }
blopentity_show:
path: /{id}/show
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:show" }
blopentity_new:
path: /new
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:new" }
blopentity_create:
path: /create
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:create" }
requirements: { _method: post }
blopentity_edit:
path: /{id}/edit
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:edit" }
blopentity_update:
path: /{id}/update
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:update" }
requirements: { _method: post|put }
blopentity_delete:
path: /{id}/delete
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:delete" }
requirements: { _method: post|delete }
blopentity_cfget:
path: /{id}/cfget/{key}
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:cfGet" }
blopentity_cfset:
path: /{id}/cfset/{key}/{value}
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:cfSet" }
blopentity_addmany_to_one:
path: /{id}/add/custom/field/{key}
defaults: {_controller: "CLCustomFieldsBundle:BlopEntity:addNewManyToOne"}

View File

@ -1,30 +0,0 @@
blopentity2:
path: /
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:index" }
blopentity2_show:
path: /{id}/show
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:show" }
blopentity2_new:
path: /new
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:new" }
blopentity2_create:
path: /create
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:create" }
requirements: { _method: post }
blopentity2_edit:
path: /{id}/edit
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:edit" }
blopentity2_update:
path: /{id}/update
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:update" }
requirements: { _method: post|put }
blopentity2_delete:
path: /{id}/delete
defaults: { _controller: "CLCustomFieldsBundle:BlopEntity2:delete" }
requirements: { _method: post|delete }

View File

@ -1,30 +0,0 @@
customfield:
path: /
defaults: { _controller: "CLCustomFieldsBundle:CustomField:index" }
customfield_show:
path: /{id}/show
defaults: { _controller: "CLCustomFieldsBundle:CustomField:show" }
customfield_new:
path: /new
defaults: { _controller: "CLCustomFieldsBundle:CustomField:new" }
customfield_create:
path: /create
defaults: { _controller: "CLCustomFieldsBundle:CustomField:create" }
requirements: { _method: post }
customfield_edit:
path: /{id}/edit
defaults: { _controller: "CLCustomFieldsBundle:CustomField:edit" }
customfield_update:
path: /{id}/update
defaults: { _controller: "CLCustomFieldsBundle:CustomField:update" }
requirements: { _method: post|put }
customfield_delete:
path: /{id}/delete
defaults: { _controller: "CLCustomFieldsBundle:CustomField:delete" }
requirements: { _method: post|delete }

View File

@ -1,30 +0,0 @@
customfieldsgroup:
path: /
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:index" }
customfieldsgroup_show:
path: /{id}/show
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:show" }
customfieldsgroup_new:
path: /new
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:new" }
customfieldsgroup_create:
path: /create
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:create" }
requirements: { _method: post }
customfieldsgroup_edit:
path: /{id}/edit
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:edit" }
customfieldsgroup_update:
path: /{id}/update
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:update" }
requirements: { _method: post|put }
customfieldsgroup_delete:
path: /{id}/delete
defaults: { _controller: "CLCustomFieldsBundle:CustomFieldsGroup:delete" }
requirements: { _method: post|delete }

View File

@ -1,11 +1,11 @@
<?php
namespace CL\CustomFieldsBundle;
namespace Chill\CustomFieldsBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use CL\CustomFieldsBundle\DependencyInjection\CustomFieldCompilerPass;
use Chill\CustomFieldsBundle\DependencyInjection\CustomFieldCompilerPass;
class CLCustomFieldsBundle extends Bundle
class ChillCustomFieldsBundle extends Bundle
{
public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container)
{

View File

@ -1,12 +1,12 @@
<?php
namespace CL\CustomFieldsBundle\Controller;
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CL\CustomFieldsBundle\Entity\Adress;
use CL\CustomFieldsBundle\Form\AdressType;
use Chill\CustomFieldsBundle\Entity\Adress;
use Chill\CustomFieldsBundle\Form\AdressType;
/**
* Adress controller.
@ -23,9 +23,9 @@ class AdressController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('CLCustomFieldsBundle:Adress')->findAll();
$entities = $em->getRepository('ChillCustomFieldsBundle:Adress')->findAll();
return $this->render('CLCustomFieldsBundle:Adress:index.html.twig', array(
return $this->render('ChillCustomFieldsBundle:Adress:index.html.twig', array(
'entities' => $entities,
));
}
@ -47,7 +47,7 @@ class AdressController extends Controller
return $this->redirect($this->generateUrl('adress_show', array('id' => $entity->getId())));
}
return $this->render('CLCustomFieldsBundle:Adress:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:Adress:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -81,7 +81,7 @@ class AdressController extends Controller
$entity = new Adress();
$form = $this->createCreateForm($entity);
return $this->render('CLCustomFieldsBundle:Adress:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:Adress:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -95,7 +95,7 @@ class AdressController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:Adress')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:Adress')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Adress entity.');
@ -103,7 +103,7 @@ class AdressController extends Controller
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:Adress:show.html.twig', array(
return $this->render('ChillCustomFieldsBundle:Adress:show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
@ -117,7 +117,7 @@ class AdressController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:Adress')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:Adress')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Adress entity.');
@ -126,7 +126,7 @@ class AdressController extends Controller
$editForm = $this->createEditForm($entity);
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:Adress:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:Adress:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -159,7 +159,7 @@ class AdressController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:Adress')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:Adress')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Adress entity.');
@ -175,7 +175,7 @@ class AdressController extends Controller
return $this->redirect($this->generateUrl('adress_edit', array('id' => $id)));
}
return $this->render('CLCustomFieldsBundle:Adress:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:Adress:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -192,7 +192,7 @@ class AdressController extends Controller
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:Adress')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:Adress')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Adress entity.');

View File

@ -1,12 +1,12 @@
<?php
namespace CL\CustomFieldsBundle\Controller;
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CL\CustomFieldsBundle\Entity\BlopEntity2;
use CL\CustomFieldsBundle\Form\BlopEntity2Type;
use Chill\CustomFieldsBundle\Entity\BlopEntity2;
use Chill\CustomFieldsBundle\Form\BlopEntity2Type;
/**
* BlopEntity2 controller.
@ -23,9 +23,9 @@ class BlopEntity2Controller extends Controller
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('CLCustomFieldsBundle:BlopEntity2')->findAll();
$entities = $em->getRepository('ChillCustomFieldsBundle:BlopEntity2')->findAll();
return $this->render('CLCustomFieldsBundle:BlopEntity2:index.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity2:index.html.twig', array(
'entities' => $entities,
));
}
@ -47,7 +47,7 @@ class BlopEntity2Controller extends Controller
return $this->redirect($this->generateUrl('blopentity2_show', array('id' => $entity->getId())));
}
return $this->render('CLCustomFieldsBundle:BlopEntity2:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity2:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -82,7 +82,7 @@ class BlopEntity2Controller extends Controller
$entity = new BlopEntity2();
$form = $this->createCreateForm($entity);
return $this->render('CLCustomFieldsBundle:BlopEntity2:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity2:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -96,7 +96,7 @@ class BlopEntity2Controller extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity2')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity2')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity2 entity.');
@ -104,7 +104,7 @@ class BlopEntity2Controller extends Controller
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:BlopEntity2:show.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity2:show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
@ -118,7 +118,7 @@ class BlopEntity2Controller extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity2')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity2')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity2 entity.');
@ -127,7 +127,7 @@ class BlopEntity2Controller extends Controller
$editForm = $this->createEditForm($entity);
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:BlopEntity2:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity2:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -161,7 +161,7 @@ class BlopEntity2Controller extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity2')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity2')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity2 entity.');
@ -177,7 +177,7 @@ class BlopEntity2Controller extends Controller
return $this->redirect($this->generateUrl('blopentity2_edit', array('id' => $id)));
}
return $this->render('CLCustomFieldsBundle:BlopEntity2:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity2:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -194,7 +194,7 @@ class BlopEntity2Controller extends Controller
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity2')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity2')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity2 entity.');

View File

@ -1,13 +1,13 @@
<?php
namespace CL\CustomFieldsBundle\Controller;
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CL\CustomFieldsBundle\Entity\BlopEntity;
use CL\CustomFieldsBundle\Form\BlopEntityType;
use CL\CustomFieldsBundle\Form\AdressType;
use Chill\CustomFieldsBundle\Entity\BlopEntity;
use Chill\CustomFieldsBundle\Form\BlopEntityType;
use Chill\CustomFieldsBundle\Form\AdressType;
/**
* BlopEntity controller.
@ -20,7 +20,7 @@ class BlopEntityController extends Controller
{
$em = $this->getDoctrine()->getManager();
$customFields = $em->getRepository('CLCustomFieldsBundle:CustomField')
$customFields = $em->getRepository('ChillCustomFieldsBundle:CustomField')
->findAll();
$customFieldsLablels = array_map(
@ -42,7 +42,7 @@ class BlopEntityController extends Controller
$em->flush();
$blopEntity = $this->om
->getRepository('CLCustomFieldsBundle:CustomField')
->getRepository('ChillCustomFieldsBundle:CustomField')
->findOneById($id);
$blopEntityCustomFieldArray = json_decode($blopEntity->getCustomField());
@ -66,9 +66,9 @@ class BlopEntityController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->findAll();
$entities = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->findAll();
return $this->render('CLCustomFieldsBundle:BlopEntity:index.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity:index.html.twig', array(
'entities' => $entities,
));
}
@ -76,7 +76,7 @@ class BlopEntityController extends Controller
public function cfSetAction($id,$key,$value)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->find($id);
echo $entity->cfSet($key,$value);
var_dump($entity->getCustomField());
$em->persist($entity);
@ -87,7 +87,7 @@ class BlopEntityController extends Controller
public function cfGetAction($id,$key)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->find($id);
echo $entity->cfGet($key);
return null;//return $entity->cfGet($key);
}
@ -110,7 +110,7 @@ class BlopEntityController extends Controller
return $this->redirect($this->generateUrl('blopentity_show', array('id' => $entity->getId())));
}
return $this->render('CLCustomFieldsBundle:BlopEntity:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -147,7 +147,7 @@ class BlopEntityController extends Controller
$entity = new BlopEntity();
$form = $this->createCreateForm($entity);
return $this->render('CLCustomFieldsBundle:BlopEntity:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -161,7 +161,7 @@ class BlopEntityController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity entity.');
@ -169,7 +169,7 @@ class BlopEntityController extends Controller
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:BlopEntity:show.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity:show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
@ -183,7 +183,7 @@ class BlopEntityController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity entity.');
@ -192,7 +192,7 @@ class BlopEntityController extends Controller
$editForm = $this->createEditForm($entity);
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:BlopEntity:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -226,7 +226,7 @@ class BlopEntityController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity entity.');
@ -242,7 +242,7 @@ class BlopEntityController extends Controller
return $this->redirect($this->generateUrl('blopentity_edit', array('id' => $id)));
}
return $this->render('CLCustomFieldsBundle:BlopEntity:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:BlopEntity:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -259,7 +259,7 @@ class BlopEntityController extends Controller
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:BlopEntity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find BlopEntity entity.');

View File

@ -1,12 +1,12 @@
<?php
namespace CL\CustomFieldsBundle\Controller;
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CL\CustomFieldsBundle\Entity\CustomField;
use CL\CustomFieldsBundle\Form\CustomFieldType;
use Chill\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\Form\CustomFieldType;
/**
* CustomField controller.
@ -23,9 +23,9 @@ class CustomFieldController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('CLCustomFieldsBundle:CustomField')->findAll();
$entities = $em->getRepository('ChillCustomFieldsBundle:CustomField')->findAll();
return $this->render('CLCustomFieldsBundle:CustomField:index.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomField:index.html.twig', array(
'entities' => $entities,
));
}
@ -47,7 +47,7 @@ class CustomFieldController extends Controller
return $this->redirect($this->generateUrl('customfield_show', array('id' => $entity->getId())));
}
return $this->render('CLCustomFieldsBundle:CustomField:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -82,7 +82,7 @@ class CustomFieldController extends Controller
$entity = new CustomField();
$form = $this->createCreateForm($entity, $request->query->get('type'));
return $this->render('CLCustomFieldsBundle:CustomField:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -96,7 +96,7 @@ class CustomFieldController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.');
@ -104,7 +104,7 @@ class CustomFieldController extends Controller
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:CustomField:show.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomField:show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
@ -118,7 +118,7 @@ class CustomFieldController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.');
@ -127,7 +127,7 @@ class CustomFieldController extends Controller
$editForm = $this->createEditForm($entity);
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:CustomField:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -160,7 +160,7 @@ class CustomFieldController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.');
@ -176,7 +176,7 @@ class CustomFieldController extends Controller
return $this->redirect($this->generateUrl('customfield_edit', array('id' => $id)));
}
return $this->render('CLCustomFieldsBundle:CustomField:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -193,7 +193,7 @@ class CustomFieldController extends Controller
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.');

View File

@ -1,12 +1,12 @@
<?php
namespace CL\CustomFieldsBundle\Controller;
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CL\CustomFieldsBundle\Entity\CustomFieldsGroup;
use CL\CustomFieldsBundle\Form\CustomFieldsGroupType;
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
use Chill\CustomFieldsBundle\Form\CustomFieldsGroupType;
/**
* CustomFieldsGroup controller.
@ -23,9 +23,9 @@ class CustomFieldsGroupController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('CLCustomFieldsBundle:CustomFieldsGroup')->findAll();
$entities = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->findAll();
return $this->render('CLCustomFieldsBundle:CustomFieldsGroup:index.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:index.html.twig', array(
'entities' => $entities,
));
}
@ -47,7 +47,7 @@ class CustomFieldsGroupController extends Controller
return $this->redirect($this->generateUrl('customfieldsgroup_show', array('id' => $entity->getId())));
}
return $this->render('CLCustomFieldsBundle:CustomFieldsGroup:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -81,7 +81,7 @@ class CustomFieldsGroupController extends Controller
$entity = new CustomFieldsGroup();
$form = $this->createCreateForm($entity);
return $this->render('CLCustomFieldsBundle:CustomFieldsGroup:new.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
@ -95,7 +95,7 @@ class CustomFieldsGroupController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomFieldsGroup')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@ -103,7 +103,7 @@ class CustomFieldsGroupController extends Controller
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:CustomFieldsGroup:show.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
@ -117,7 +117,7 @@ class CustomFieldsGroupController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomFieldsGroup')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@ -126,7 +126,7 @@ class CustomFieldsGroupController extends Controller
$editForm = $this->createEditForm($entity);
$deleteForm = $this->createDeleteForm($id);
return $this->render('CLCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -159,7 +159,7 @@ class CustomFieldsGroupController extends Controller
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomFieldsGroup')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@ -175,7 +175,7 @@ class CustomFieldsGroupController extends Controller
return $this->redirect($this->generateUrl('customfieldsgroup_edit', array('id' => $id)));
}
return $this->render('CLCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', array(
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
@ -192,7 +192,7 @@ class CustomFieldsGroupController extends Controller
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('CLCustomFieldsBundle:CustomFieldsGroup')->find($id);
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Controller;
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
@ -8,6 +8,6 @@ class DefaultController extends Controller
{
public function indexAction($name)
{
return $this->render('CLCustomFieldsBundle:Default:index.html.twig', array('name' => $name));
return $this->render('ChillCustomFieldsBundle:Default:index.html.twig', array('name' => $name));
}
}

View File

@ -1,13 +1,13 @@
<?php
namespace CL\CustomFieldsBundle\CustomFields;
namespace Chill\CustomFieldsBundle\CustomFields;
use CL\CustomFieldsBundle\CustomFields\CustomFieldInterface;
use CL\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\CustomFields\CustomFieldInterface;
use Chill\CustomFieldsBundle\Entity\CustomField;
use Symfony\Component\Form\FormBuilderInterface;
use Doctrine\ORM\EntityManagerInterface;
use CL\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
use CL\CustomFieldsBundle\Form\AdressType;
use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
use Chill\CustomFieldsBundle\Form\AdressType;
/**
* Description of CustomFieldAddress
@ -32,7 +32,7 @@ class CustomFieldAddress implements CustomFieldInterface
{
$builder->add(
$builder->create('address', 'entity', array(
'class' => 'CLCustomFieldsBundle:Adress',
'class' => 'ChillCustomFieldsBundle:Adress',
'multiple' => true,
'expanded' => true
)
@ -64,16 +64,16 @@ class CustomFieldAddress implements CustomFieldInterface
// return null;
// }
//
// return $this->om->getRepository('CLCustomFieldsBundle:Adress')
// return $this->om->getRepository('ChillCustomFieldsBundle:Adress')
// ->find($serialized);
return $this->om->getRepository('CLCustomFieldsBundle:Adress')
return $this->om->getRepository('ChillCustomFieldsBundle:Adress')
->findBy(array('id' => $serialized));
}
/**
*
* @param \CL\CustomFieldsBundle\Entity\Adress $value
* @param \Chill\CustomFieldsBundle\Entity\Adress $value
* @param CustomField $customField
* @return type
*/

View File

@ -1,9 +1,9 @@
<?php
namespace CL\CustomFieldsBundle\CustomFields;
namespace Chill\CustomFieldsBundle\CustomFields;
use Symfony\Component\Form\FormBuilderInterface;
use CL\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\Entity\CustomField;
/**
*
@ -14,8 +14,8 @@ interface CustomFieldInterface
/**
*
* @param \CL\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
* @param \Chill\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
* @return \Symfony\Component\Form\FormTypeInterface the form type
*/
public function buildForm(FormBuilderInterface $builder, CustomField $customField);
@ -24,7 +24,7 @@ interface CustomFieldInterface
* transform the value into a format that can be stored in DB
*
* @param mixed $value
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
*/
public function serialize($value, CustomField $customField);
@ -33,14 +33,14 @@ interface CustomFieldInterface
* value which may be used in the process.
*
* @param mixed $value
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
*/
public function deserialize($serialized, CustomField $customField);
/**
*
* @param type $value
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
*/
public function render($value, CustomField $customField);
@ -50,7 +50,7 @@ interface CustomFieldInterface
* return a formType which allow to edit option for the custom type.
* This FormType is shown in admin
*
* @param \CL\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @param \Chill\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @return \Symfony\Component\Form\FormTypeInterface|null the form type
*/
public function buildOptionsForm(FormBuilderInterface $builder);

View File

@ -2,10 +2,10 @@
namespace CL\CustomFieldsBundle\CustomFields;
namespace Chill\CustomFieldsBundle\CustomFields;
use CL\CustomFieldsBundle\CustomFields\CustomFieldInterface;
use CL\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\CustomFields\CustomFieldInterface;
use Chill\CustomFieldsBundle\Entity\CustomField;
use Symfony\Component\Form\FormBuilderInterface;
/**

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\DependencyInjection;
namespace Chill\CustomFieldsBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
@ -12,7 +12,7 @@ use Symfony\Component\DependencyInjection\Loader;
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
*/
class CLCustomFieldsExtension extends Extension
class ChillCustomFieldsExtension extends Extension
{
/**
* {@inheritDoc}

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\DependencyInjection;
namespace Chill\CustomFieldsBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

View File

@ -1,7 +1,7 @@
<?php
namespace CL\CustomFieldsBundle\DependencyInjection;
namespace Chill\CustomFieldsBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Entity;
namespace Chill\CustomFieldsBundle\Entity;
/**
* Adress

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Entity;
namespace Chill\CustomFieldsBundle\Entity;
/**
* BlopEntity

View File

@ -1,12 +1,12 @@
<?php
namespace CL\CustomFieldsBundle\Entity;
namespace Chill\CustomFieldsBundle\Entity;
use Doctrine\ORM\EntityManager;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreFlushEventArgs;
use Doctrine\Common\Collections\ArrayCollection;
use CL\CustomFieldsBundle\Entity\Adress;
use Chill\CustomFieldsBundle\Entity\Adress;
// ATTENTION QD NOUVEL OBJ cree sans appel a doctrine
@ -51,7 +51,7 @@ class BlopEntity2
$em = $args->getObjectManager();
$customFields = $em
->getRepository('CLCustomFieldsBundle:CustomField')
->getRepository('ChillCustomFieldsBundle:CustomField')
->findAll();
$customFieldsLablels = array_map(
@ -80,7 +80,7 @@ class BlopEntity2
foreach ($customFieldDataArray[$key] as $idEntity) {
$fieldUnfolded->add($em
->getRepository('CLCustomFieldsBundle:' . $entityClass)
->getRepository('ChillCustomFieldsBundle:' . $entityClass)
->findOneById($idEntity));
}
}
@ -90,12 +90,12 @@ class BlopEntity2
$entityClass = 'Adress'; // substr($type,10,-1);
if(array_key_exists($key, $customFieldDataArray)) {
$customFieldDataUnfolded[$key] = $em
->getRepository('CLCustomFieldsBundle:' . $entityClass)
->getRepository('ChillCustomFieldsBundle:' . $entityClass)
->findOneById($customFieldDataArray[$key]);
} else {
// TODO : doit tjs avoir un id
$em
->getRepository('CLCustomFieldsBundle:' . $entityClass)
->getRepository('ChillCustomFieldsBundle:' . $entityClass)
->findOneById(1);
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Entity;
namespace Chill\CustomFieldsBundle\Entity;
/**
* CustomField
@ -181,11 +181,11 @@ class CustomField
/**
* Set customFieldGroup
*
* @param \CL\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup
* @param \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup
*
* @return CustomField
*/
public function setCustomFieldsGroup(\CL\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null)
public function setCustomFieldsGroup(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null)
{
$this->customFieldGroup = $customFieldGroup;
@ -257,11 +257,11 @@ class CustomField
/**
* Set customFieldGroup
*
* @param \CL\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup
* @param \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup
*
* @return CustomField
*/
public function setCustomFieldGroup(\CL\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null)
public function setCustomFieldGroup(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null)
{
$this->customFieldGroup = $customFieldGroup;
@ -271,7 +271,7 @@ class CustomField
/**
* Get customFieldGroup
*
* @return \CL\CustomFieldsBundle\Entity\CustomFieldsGroup
* @return \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
*/
public function getCustomFieldGroup()
{

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Entity;
namespace Chill\CustomFieldsBundle\Entity;
/**
* CustomFieldGroup
@ -38,11 +38,11 @@ class CustomFieldsGroup
/**
* Add customField
*
* @param \CL\CustomFieldsBundle\Entity\CustomField $customField
* @param \Chill\CustomFieldsBundle\Entity\CustomField $customField
*
* @return CustomFieldsGroup
*/
public function addCustomField(\CL\CustomFieldsBundle\Entity\CustomField $customField)
public function addCustomField(\Chill\CustomFieldsBundle\Entity\CustomField $customField)
{
$this->customFields[] = $customField;
@ -52,9 +52,9 @@ class CustomFieldsGroup
/**
* Remove customField
*
* @param \CL\CustomFieldsBundle\Entity\CustomField $customField
* @param \Chill\CustomFieldsBundle\Entity\CustomField $customField
*/
public function removeCustomField(\CL\CustomFieldsBundle\Entity\CustomField $customField)
public function removeCustomField(\Chill\CustomFieldsBundle\Entity\CustomField $customField)
{
$this->customFields->removeElement($customField);
}

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Form;
namespace Chill\CustomFieldsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -32,8 +32,8 @@ class AdressType extends AbstractType
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
// $resolver->setDefaults(array(
// 'data_class' => 'CL\CustomFieldsBundle\Entity\Adress',
// 'class' => 'CL\CustomFieldsBundle\Entity\Adress'
// 'data_class' => 'Chill\CustomFieldsBundle\Entity\Adress',
// 'class' => 'Chill\CustomFieldsBundle\Entity\Adress'
// ));
}

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Form;
namespace Chill\CustomFieldsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -17,20 +17,20 @@ class BlopEntity2Type extends AbstractType
$em = $options['em'];
$customFields = $em
->getRepository('CLCustomFieldsBundle:CustomField')
->getRepository('ChillCustomFieldsBundle:CustomField')
->findAll();
foreach ($customFields as $cf) {
if($cf->getType() === 'ManyToOne(Adress)') {
$builder->add($cf->getLabel(), 'entity', array(
'class' => 'CLCustomFieldsBundle:Adress',
'class' => 'ChillCustomFieldsBundle:Adress',
'property' => 'data'
));
} else if ($cf->getType() === 'ManyToOnePersist(Adress)') {
$builder->add($cf->getLabel(), new AdressType());
} else if($cf->getType() === 'ManyToMany(Adress)') {
$builder->add($cf->getLabel(), 'entity', array(
'class' => 'CLCustomFieldsBundle:Adress',
'class' => 'ChillCustomFieldsBundle:Adress',
'property' => 'data',
'multiple' => true
));
@ -46,7 +46,7 @@ class BlopEntity2Type extends AbstractType
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'CL\CustomFieldsBundle\Entity\BlopEntity2'
'data_class' => 'Chill\CustomFieldsBundle\Entity\BlopEntity2'
));
// supprimer ça en definissant dans services

View File

@ -1,11 +1,11 @@
<?php
namespace CL\CustomFieldsBundle\Form;
namespace Chill\CustomFieldsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use CL\CustomFieldsBundle\Form\Type\CustomFieldType;
use Chill\CustomFieldsBundle\Form\Type\CustomFieldType;
class BlopEntityType extends AbstractType
{
@ -31,7 +31,7 @@ class BlopEntityType extends AbstractType
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'CL\CustomFieldsBundle\Entity\BlopEntity',
'data_class' => 'Chill\CustomFieldsBundle\Entity\BlopEntity',
'cascade_validation' => true
));

View File

@ -1,12 +1,12 @@
<?php
namespace CL\CustomFieldsBundle\Form;
namespace Chill\CustomFieldsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use CL\CustomFieldsBundle\Service\CustomFieldProvider;
use CL\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
use Chill\CustomFieldsBundle\Entity\CustomField;
class CustomFieldType extends AbstractType
{
@ -40,7 +40,7 @@ class CustomFieldType extends AbstractType
->add('label')
->add('active')
->add('customFieldsGroup', 'entity', array(
'class' => 'CLCustomFieldsBundle:CustomFieldsGroup',
'class' => 'ChillCustomFieldsBundle:CustomFieldsGroup',
'property' => 'name['.$this->culture.']'
))
;
@ -60,7 +60,7 @@ class CustomFieldType extends AbstractType
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'CL\CustomFieldsBundle\Entity\CustomField'
'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomField'
));
$resolver->addAllowedTypes(array('type' => 'string'));
}

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Form;
namespace Chill\CustomFieldsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -26,7 +26,7 @@ class CustomFieldsGroupType extends AbstractType
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'CL\CustomFieldsBundle\Entity\CustomFieldsGroup'
'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup'
));
}

View File

@ -1,10 +1,10 @@
<?php
namespace CL\CustomFieldsBundle\Form\DataTransformer;
namespace Chill\CustomFieldsBundle\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use CL\CustomFieldsBundle\CustomFields\CustomFieldInterface;
use CL\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\CustomFields\CustomFieldInterface;
use Chill\CustomFieldsBundle\Entity\CustomField;
/**
*
@ -17,7 +17,7 @@ class CustomFieldDataTransformer implements DataTransformerInterface
/**
*
* @var \CL\CustomFieldsBundle\Entity\CustomField
* @var \Chill\CustomFieldsBundle\Entity\CustomField
*/
private $customField;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Form\DataTransformer;
namespace Chill\CustomFieldsBundle\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use Doctrine\Common\Persistence\ObjectManager;
@ -20,7 +20,7 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface {
$this->om = $om;
$customFields = $this->om
->getRepository('CLCustomFieldsBundle:CustomField')
->getRepository('ChillCustomFieldsBundle:CustomField')
->findAll();
$customFieldsLablels = array_map(
@ -64,7 +64,7 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface {
}
$customFieldsArrayRet[$key] = $this->om
->getRepository('CLCustomFieldsBundle:' . $entityClass)
->getRepository('ChillCustomFieldsBundle:' . $entityClass)
->findOneById($value);
$traited = true;
} else if ($type === 'ManyToMany(Adress)') {

View File

@ -9,15 +9,15 @@
* file that was distributed with this source code.
*/
namespace CL\CustomFieldsBundle\Form\Type;
namespace Chill\CustomFieldsBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use CL\CustomFieldsBundle\Form\DataTransformer\JsonCustomFieldToArrayTransformer;
use Chill\CustomFieldsBundle\Form\DataTransformer\JsonCustomFieldToArrayTransformer;
use Doctrine\Common\Persistence\ObjectManager;
use CL\CustomFieldsBundle\Form\AdressType;
use CL\CustomFieldsBundle\Service\CustomFieldProvider;
use CL\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
use Chill\CustomFieldsBundle\Form\AdressType;
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
class CustomFieldType extends AbstractType
{
@ -45,7 +45,7 @@ class CustomFieldType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$customFields = $this->om
->getRepository('CLCustomFieldsBundle:CustomField')
->getRepository('ChillCustomFieldsBundle:CustomField')
->findAll();
foreach ($customFields as $cf) {
@ -66,7 +66,7 @@ class CustomFieldType extends AbstractType
// if($cf->getType() === 'ManyToOne(Adress)') {
// $builder->add($cf->getLabel(), 'entity', array(
// 'class' => 'CLCustomFieldsBundle:Adress',
// 'class' => 'ChillCustomFieldsBundle:Adress',
// 'property' => 'data'
// ));
// } else if ($cf->getType() === 'ManyToOnePersist(Adress)') {
@ -74,7 +74,7 @@ class CustomFieldType extends AbstractType
// } else if($cf->getType() === 'ManyToMany(Adress)') {
//
// $adress = $this->om
// ->getRepository('CLCustomFieldsBundle:Adress')
// ->getRepository('ChillCustomFieldsBundle:Adress')
// ->findAll();
//
// $adressId = array_map(

View File

@ -1,4 +1,4 @@
CL\CustomFieldsBundle\Entity\Adress:
Chill\CustomFieldsBundle\Entity\Adress:
type: entity
table: null
id:

View File

@ -1,4 +1,4 @@
CL\CustomFieldsBundle\Entity\BlopEntity:
Chill\CustomFieldsBundle\Entity\BlopEntity:
type: entity
table: blop_entity
id:
@ -18,6 +18,6 @@ CL\CustomFieldsBundle\Entity\BlopEntity:
type: json_array
manyToOne:
adress:
targetEntity: CL\CustomFieldsBundle\Entity\Adress
targetEntity: Chill\CustomFieldsBundle\Entity\Adress
cascade: [persist]
lifecycleCallbacks: { }

View File

@ -1,4 +1,4 @@
CL\CustomFieldsBundle\Entity\BlopEntity2:
Chill\CustomFieldsBundle\Entity\BlopEntity2:
type: entity
table: null
id:

View File

@ -1,4 +1,4 @@
CL\CustomFieldsBundle\Entity\CustomField:
Chill\CustomFieldsBundle\Entity\CustomField:
type: entity
table: null
id:
@ -25,6 +25,6 @@ CL\CustomFieldsBundle\Entity\CustomField:
lifecycleCallbacks: { }
manyToOne:
customFieldGroup:
targetEntity: CL\CustomFieldsBundle\Entity\CustomFieldsGroup
targetEntity: Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
inversedBy: customFields
#TODO: add an unique constraint slug+customFieldsGroup

View File

@ -1,4 +1,4 @@
CL\CustomFieldsBundle\Entity\CustomFieldsGroup:
Chill\CustomFieldsBundle\Entity\CustomFieldsGroup:
type: entity
table: null
id:
@ -15,5 +15,5 @@ CL\CustomFieldsBundle\Entity\CustomFieldsGroup:
length: 255
oneToMany:
customFields:
targetEntity: CL\CustomFieldsBundle\Entity\CustomField
targetEntity: Chill\CustomFieldsBundle\Entity\CustomField
mappedBy: customFieldGroup

View File

@ -0,0 +1,20 @@
cl_custom_fields_customfieldsgroup:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfieldsgroup.yml"
prefix: /customfieldsgroup
cl_custom_fields_blopentity2:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/blopentity2.yml"
prefix: /blopentity2
cl_custom_fields_adress:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/adress.yml"
prefix: /adress
cl_custom_fields_customfield:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfield.yml"
prefix: /customfield
cl_custom_fields_blopentity:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/blopentity.yml"
prefix: /

View File

@ -0,0 +1,30 @@
adress:
path: /
defaults: { _controller: "ChillCustomFieldsBundle:Adress:index" }
adress_show:
path: /{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:Adress:show" }
adress_new:
path: /new
defaults: { _controller: "ChillCustomFieldsBundle:Adress:new" }
adress_create:
path: /create
defaults: { _controller: "ChillCustomFieldsBundle:Adress:create" }
requirements: { _method: post }
adress_edit:
path: /{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:Adress:edit" }
adress_update:
path: /{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:Adress:update" }
requirements: { _method: post|put }
adress_delete:
path: /{id}/delete
defaults: { _controller: "ChillCustomFieldsBundle:Adress:delete" }
requirements: { _method: post|delete }

View File

@ -0,0 +1,42 @@
blopentity:
path: /
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:index" }
blopentity_show:
path: /{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:show" }
blopentity_new:
path: /new
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:new" }
blopentity_create:
path: /create
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:create" }
requirements: { _method: post }
blopentity_edit:
path: /{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:edit" }
blopentity_update:
path: /{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:update" }
requirements: { _method: post|put }
blopentity_delete:
path: /{id}/delete
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:delete" }
requirements: { _method: post|delete }
blopentity_cfget:
path: /{id}/cfget/{key}
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:cfGet" }
blopentity_cfset:
path: /{id}/cfset/{key}/{value}
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity:cfSet" }
blopentity_addmany_to_one:
path: /{id}/add/custom/field/{key}
defaults: {_controller: "ChillCustomFieldsBundle:BlopEntity:addNewManyToOne"}

View File

@ -0,0 +1,30 @@
blopentity2:
path: /
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:index" }
blopentity2_show:
path: /{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:show" }
blopentity2_new:
path: /new
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:new" }
blopentity2_create:
path: /create
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:create" }
requirements: { _method: post }
blopentity2_edit:
path: /{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:edit" }
blopentity2_update:
path: /{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:update" }
requirements: { _method: post|put }
blopentity2_delete:
path: /{id}/delete
defaults: { _controller: "ChillCustomFieldsBundle:BlopEntity2:delete" }
requirements: { _method: post|delete }

View File

@ -0,0 +1,30 @@
customfield:
path: /
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:index" }
customfield_show:
path: /{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:show" }
customfield_new:
path: /new
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:new" }
customfield_create:
path: /create
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:create" }
requirements: { _method: post }
customfield_edit:
path: /{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:edit" }
customfield_update:
path: /{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:update" }
requirements: { _method: post|put }
customfield_delete:
path: /{id}/delete
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:delete" }
requirements: { _method: post|delete }

View File

@ -0,0 +1,30 @@
customfieldsgroup:
path: /
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:index" }
customfieldsgroup_show:
path: /{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:show" }
customfieldsgroup_new:
path: /new
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:new" }
customfieldsgroup_create:
path: /create
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:create" }
requirements: { _method: post }
customfieldsgroup_edit:
path: /{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:edit" }
customfieldsgroup_update:
path: /{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:update" }
requirements: { _method: post|put }
customfieldsgroup_delete:
path: /{id}/delete
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:delete" }
requirements: { _method: post|delete }

View File

@ -1,21 +1,21 @@
parameters:
# cl_custom_fields.example.class: CL\CustomFieldsBundle\Example
# cl_custom_fields.example.class: Chill\CustomFieldsBundle\Example
services:
chill.custom_field_compiler:
class: CL\CustomFieldsBundle\Service\CustomFieldProvider
class: Chill\CustomFieldsBundle\Service\CustomFieldProvider
call:
- [setContainer, ["@service_container"]]
chill.custom_field.custom_field_choice_type:
class: CL\CustomFieldsBundle\Form\CustomFieldType
class: Chill\CustomFieldsBundle\Form\CustomFieldType
arguments:
- "@chill.custom_field_compiler"
tags:
- { name: 'form.type', alias: 'custom_field_choice' }
chill.custom_field.custom_field_type:
class: CL\CustomFieldsBundle\Form\Type\CustomFieldType
class: Chill\CustomFieldsBundle\Form\Type\CustomFieldType
arguments:
- "@doctrine.orm.entity_manager"
- "@chill.custom_field_compiler"
@ -23,12 +23,12 @@ services:
- { name: 'form.type', alias: 'custom_field' }
chill.custom_field.text:
class: CL\CustomFieldsBundle\CustomFields\CustomFieldText
class: Chill\CustomFieldsBundle\CustomFields\CustomFieldText
tags:
- { name: 'chill.custom_field', type: 'text' }
chill.custom_field.address:
class: CL\CustomFieldsBundle\CustomFields\CustomFieldAddress
class: Chill\CustomFieldsBundle\CustomFields\CustomFieldAddress
arguments:
- "@doctrine.orm.entity_manager"
tags:

View File

@ -1,7 +1,7 @@
<?php
namespace CL\CustomFieldsBundle\Service;
namespace Chill\CustomFieldsBundle\Service;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -1,6 +1,6 @@
<?php
namespace CL\CustomFieldsBundle\Tests\Controller;
namespace Chill\CustomFieldsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;