mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
Debug
This commit is contained in:
parent
21676a20b2
commit
5584666165
@ -353,7 +353,7 @@ class PersonController extends Controller
|
|||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$person = $em->getRepository('ChillPersonBundle:Person')
|
$person = $em->getRepository('ChillPersonBundle:Person')
|
||||||
->find($id);
|
->find($id);
|
||||||
|
|
||||||
return $person;
|
return $person;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ namespace Chill\PersonBundle\Entity;
|
|||||||
|
|
||||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||||
use Chill\MainBundle\Entity\Country;
|
use Chill\MainBundle\Entity\Country;
|
||||||
|
use Chill\PersonBundle\Entity\MaritalStatus;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Chill\MainBundle\Entity\HasCenterInterface;
|
use Chill\MainBundle\Entity\HasCenterInterface;
|
||||||
|
|
||||||
@ -402,7 +403,7 @@ class Person implements HasCenterInterface {
|
|||||||
* @param \Chill\PersonBundle\Entity\MaritalStatus $maritalStatus
|
* @param \Chill\PersonBundle\Entity\MaritalStatus $maritalStatus
|
||||||
* @return Person
|
* @return Person
|
||||||
*/
|
*/
|
||||||
public function setMaritalStatus($maritalStatus)
|
public function setMaritalStatus(MaritalStatus $maritalStatus = null)
|
||||||
{
|
{
|
||||||
$this->maritalStatus = $maritalStatus;
|
$this->maritalStatus = $maritalStatus;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -55,7 +55,6 @@ class CreationPersonType extends AbstractType
|
|||||||
$dateToStringTransformer = new DateTimeToStringTransformer(
|
$dateToStringTransformer = new DateTimeToStringTransformer(
|
||||||
null, null, 'dd-MM-yyyy', true);
|
null, null, 'dd-MM-yyyy', true);
|
||||||
|
|
||||||
|
|
||||||
$builder->add('firstName', 'hidden')
|
$builder->add('firstName', 'hidden')
|
||||||
->add('lastName', 'hidden')
|
->add('lastName', 'hidden')
|
||||||
->add( $builder->create('birthdate', 'hidden')
|
->add( $builder->create('birthdate', 'hidden')
|
||||||
|
@ -55,6 +55,7 @@ Chill\PersonBundle\Entity\Person:
|
|||||||
nullable: false
|
nullable: false
|
||||||
maritalStatus:
|
maritalStatus:
|
||||||
targetEntity: Chill\PersonBundle\Entity\MaritalStatus
|
targetEntity: Chill\PersonBundle\Entity\MaritalStatus
|
||||||
|
nullable: true
|
||||||
oneToMany:
|
oneToMany:
|
||||||
accompanyingPeriods:
|
accompanyingPeriods:
|
||||||
targetEntity: AccompanyingPeriod
|
targetEntity: AccompanyingPeriod
|
||||||
|
@ -116,7 +116,11 @@ This view should receive those arguments:
|
|||||||
<dl>
|
<dl>
|
||||||
<dt class="inline">{{'Marital status'|trans}}</dt>
|
<dt class="inline">{{'Marital status'|trans}}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{ person.maritalStatus.name|localize_translatable_string }}
|
{% if person.maritalStatus is not null %}
|
||||||
|
{{ person.maritalStatus.name|localize_translatable_string }}
|
||||||
|
{% else %}
|
||||||
|
{{ 'no data given'|trans }}
|
||||||
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</figure>
|
</figure>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Tests\Controller;
|
namespace Chill\PersonBundle\Tests\Controller;
|
||||||
|
|
||||||
|
ini_set('memory_limit', '-1');
|
||||||
|
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
|
|
||||||
@ -240,7 +242,8 @@ class PersonControllerUpdateTest extends WebTestCase
|
|||||||
['memo', '', function(Person $person) { return $person->getMemo(); }],
|
['memo', '', function(Person $person) { return $person->getMemo(); }],
|
||||||
['countryOfBirth', NULL, function(Person $person) { return $person->getCountryOfBirth(); }],
|
['countryOfBirth', NULL, function(Person $person) { return $person->getCountryOfBirth(); }],
|
||||||
['nationality', NULL, function(Person $person) { return $person->getNationality(); }],
|
['nationality', NULL, function(Person $person) { return $person->getNationality(); }],
|
||||||
['gender', Person::FEMALE_GENDER, function(Person $person) { return $person->getGender(); }]
|
['gender', Person::FEMALE_GENDER, function(Person $person) { return $person->getGender(); }],
|
||||||
|
['maritalStatus', NULL, function(Person $person) {return $person->getMaritalStatus(); }]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user