Merge branch 'master' of git://github.com/Chill-project/Person

This commit is contained in:
Marc Ducobu 2014-11-26 13:02:36 +01:00
commit f903e50d73
6 changed files with 11 additions and 5 deletions

View File

@ -42,7 +42,7 @@ class PersonType extends AbstractType
->add('dateOfBirth', 'date', array('required' => false, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
->add('placeOfBirth', 'text', array('required' => false))
->add('genre', new GenderType(), array(
'required' => false
'required' => true
))
->add('memo', 'textarea', array('required' => false))
->add('phonenumber', 'textarea', array('required' => false))

View File

@ -33,7 +33,7 @@ class GenderType extends AbstractType {
'choices' => $a,
'expanded' => true,
'multiple' => false,
'empty_value' => 'Not given'
'empty_value' => null
));
}

View File

@ -1,6 +1,9 @@
Chill\PersonBundle\Entity\Person:
type: entity
table: null
indexes:
person_names:
columns: [firstName, lastName]
repositoryClass: Chill\PersonBundle\Entity\PersonRepository
fields:
id:

View File

@ -99,7 +99,8 @@ class PersonSearch extends AbstractSearch
$dql = 'SELECT p FROM ChillPersonBundle:Person p'
. ' WHERE'
. ' LOWER(p.firstName) like LOWER(:q)'
. ' OR LOWER(p.lastName) like LOWER(:q)';
. ' OR LOWER(p.lastName) like LOWER(:q)'
. 'ORDER BY p.lastName, p.firstName';
$query = $this->om->createQuery($dql)
->setParameter('q', '%'.trim($pattern).'%')

View File

@ -15,6 +15,8 @@ class AppKernel extends Kernel
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Chill\PersonBundle\ChillPersonBundle(),
new Chill\MainBundle\ChillMainBundle(),
new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle,
#add here all the required bundle (some bundle are not required)
);
}

View File

@ -28,11 +28,11 @@
"doctrine/common": "2.4.*@dev",
"doctrine/doctrine-bundle": "~1.2@dev",
"chill-project/main": "*@dev",
"chill-project/custom-fields": "*@dev"
"chill-project/custom-fields": "*@dev",
"doctrine/doctrine-fixtures-bundle": "~2.2"
},
"require-dev": {
"symfony/dom-crawler": "2.5",
"doctrine/doctrine-fixtures-bundle": "~2.2",
"symfony/security": "~2.5"
}
}