mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
backend: adapt deprecated getGenderNumeric
This commit is contained in:
parent
76d6a9b4df
commit
1155555bb3
@ -901,13 +901,19 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
|||||||
* return gender as a Numeric form.
|
* return gender as a Numeric form.
|
||||||
* This is used for translations
|
* This is used for translations
|
||||||
* @return int
|
* @return int
|
||||||
|
* @deprecated Keep for legacy. Used in Chill 1.5 for feminize before icu translations
|
||||||
*/
|
*/
|
||||||
public function getGenderNumeric()
|
public function getGenderNumeric()
|
||||||
{
|
{
|
||||||
if ($this->getGender() == self::FEMALE_GENDER) {
|
switch ($this->getGender()) {
|
||||||
return 1;
|
case self::FEMALE_GENDER:
|
||||||
} else {
|
return 1;
|
||||||
return 0;
|
case self::MALE_GENDER:
|
||||||
|
return 0;
|
||||||
|
case self::BOTH_GENDER:
|
||||||
|
return 2;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,6 @@ class PersonNormalizer implements
|
|||||||
'mobilenumber' => $person->getMobilenumber(),
|
'mobilenumber' => $person->getMobilenumber(),
|
||||||
'altNames' => $this->normalizeAltNames($person->getAltNames()),
|
'altNames' => $this->normalizeAltNames($person->getAltNames()),
|
||||||
'gender' => $person->getGender(),
|
'gender' => $person->getGender(),
|
||||||
'gender_numeric' => $person->getGenderNumeric(),
|
|
||||||
'current_household_address' => $this->normalizer->normalize($person->getCurrentHouseholdAddress()),
|
'current_household_address' => $this->normalizer->normalize($person->getCurrentHouseholdAddress()),
|
||||||
'current_household_id' => $household ? $this->normalizer->normalize($household->getId()) : null,
|
'current_household_id' => $household ? $this->normalizer->normalize($household->getId()) : null,
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user