mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-16 15:24:26 +00:00
Merge branch 'master' of git://github.com/Chill-project/Person
This commit is contained in:
commit
f903e50d73
@ -42,7 +42,7 @@ class PersonType extends AbstractType
|
|||||||
->add('dateOfBirth', 'date', array('required' => false, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
|
->add('dateOfBirth', 'date', array('required' => false, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
|
||||||
->add('placeOfBirth', 'text', array('required' => false))
|
->add('placeOfBirth', 'text', array('required' => false))
|
||||||
->add('genre', new GenderType(), array(
|
->add('genre', new GenderType(), array(
|
||||||
'required' => false
|
'required' => true
|
||||||
))
|
))
|
||||||
->add('memo', 'textarea', array('required' => false))
|
->add('memo', 'textarea', array('required' => false))
|
||||||
->add('phonenumber', 'textarea', array('required' => false))
|
->add('phonenumber', 'textarea', array('required' => false))
|
||||||
|
@ -33,7 +33,7 @@ class GenderType extends AbstractType {
|
|||||||
'choices' => $a,
|
'choices' => $a,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'empty_value' => 'Not given'
|
'empty_value' => null
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Chill\PersonBundle\Entity\Person:
|
Chill\PersonBundle\Entity\Person:
|
||||||
type: entity
|
type: entity
|
||||||
table: null
|
table: null
|
||||||
|
indexes:
|
||||||
|
person_names:
|
||||||
|
columns: [firstName, lastName]
|
||||||
repositoryClass: Chill\PersonBundle\Entity\PersonRepository
|
repositoryClass: Chill\PersonBundle\Entity\PersonRepository
|
||||||
fields:
|
fields:
|
||||||
id:
|
id:
|
||||||
|
@ -99,7 +99,8 @@ class PersonSearch extends AbstractSearch
|
|||||||
$dql = 'SELECT p FROM ChillPersonBundle:Person p'
|
$dql = 'SELECT p FROM ChillPersonBundle:Person p'
|
||||||
. ' WHERE'
|
. ' WHERE'
|
||||||
. ' LOWER(p.firstName) like LOWER(:q)'
|
. ' 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)
|
$query = $this->om->createQuery($dql)
|
||||||
->setParameter('q', '%'.trim($pattern).'%')
|
->setParameter('q', '%'.trim($pattern).'%')
|
||||||
|
@ -15,6 +15,8 @@ class AppKernel extends Kernel
|
|||||||
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
|
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
|
||||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||||
new Chill\PersonBundle\ChillPersonBundle(),
|
new Chill\PersonBundle\ChillPersonBundle(),
|
||||||
|
new Chill\MainBundle\ChillMainBundle(),
|
||||||
|
new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle,
|
||||||
#add here all the required bundle (some bundle are not required)
|
#add here all the required bundle (some bundle are not required)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,11 @@
|
|||||||
"doctrine/common": "2.4.*@dev",
|
"doctrine/common": "2.4.*@dev",
|
||||||
"doctrine/doctrine-bundle": "~1.2@dev",
|
"doctrine/doctrine-bundle": "~1.2@dev",
|
||||||
"chill-project/main": "*@dev",
|
"chill-project/main": "*@dev",
|
||||||
"chill-project/custom-fields": "*@dev"
|
"chill-project/custom-fields": "*@dev",
|
||||||
|
"doctrine/doctrine-fixtures-bundle": "~2.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/dom-crawler": "2.5",
|
"symfony/dom-crawler": "2.5",
|
||||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
|
||||||
"symfony/security": "~2.5"
|
"symfony/security": "~2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user