mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
Renaming private varialbes of Entity/Person : history -> accompanyingPeriods, proxyHistoryOpenState -> proxyAccompanyingPeriodOpenState
This commit is contained in:
parent
1071d5ff62
commit
ef6fb61d4d
@ -87,13 +87,13 @@ class Person {
|
|||||||
*
|
*
|
||||||
* @var \Doctrine\Common\Collections\ArrayCollection
|
* @var \Doctrine\Common\Collections\ArrayCollection
|
||||||
*/
|
*/
|
||||||
private $history;
|
private $accompanyingPeriods;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $proxyHistoryOpenState = false;
|
private $proxyAccompanyingPeriodOpenState = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,7 +114,7 @@ class Person {
|
|||||||
private $spokenLanguages;
|
private $spokenLanguages;
|
||||||
|
|
||||||
public function __construct(\DateTime $opening = null) {
|
public function __construct(\DateTime $opening = null) {
|
||||||
$this->history = new ArrayCollection();
|
$this->accompanyingPeriods = new ArrayCollection();
|
||||||
$this->spokenLanguages = new ArrayCollection();
|
$this->spokenLanguages = new ArrayCollection();
|
||||||
|
|
||||||
if ($opening === null) {
|
if ($opening === null) {
|
||||||
@ -129,13 +129,13 @@ class Person {
|
|||||||
* @param \Chill\PersonBundle\Entity\AccompanyingPeriod $period
|
* @param \Chill\PersonBundle\Entity\AccompanyingPeriod $period
|
||||||
* @uses AccompanyingPeriod::setPerson
|
* @uses AccompanyingPeriod::setPerson
|
||||||
*/
|
*/
|
||||||
public function addAccompanyingPeriod(AccompanyingPeriod $period) {
|
public function addAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod) {
|
||||||
$period->setPerson($this);
|
$accompanyingPeriod->setPerson($this);
|
||||||
$this->history->add($period);
|
$this->accompanyingPeriods->add($accompanyingPeriod);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeHistoryFile(AccompanyingPeriod $history) {
|
public function removeAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod) {
|
||||||
$this->history->remove($history);
|
$this->accompanyingPeriods->remove($accompanyingPeriod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -151,7 +151,7 @@ class Person {
|
|||||||
* @param \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod
|
* @param \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod
|
||||||
*/
|
*/
|
||||||
public function open(AccompanyingPeriod $accompanyingPeriod) {
|
public function open(AccompanyingPeriod $accompanyingPeriod) {
|
||||||
$this->proxyHistoryOpenState = true;
|
$this->proxyAccompanyingPeriodOpenState = true;
|
||||||
$this->addAccompanyingPeriod($accompanyingPeriod);
|
$this->addAccompanyingPeriod($accompanyingPeriod);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ class Person {
|
|||||||
*/
|
*/
|
||||||
public function close(AccompanyingPeriod $accompanyingPeriod)
|
public function close(AccompanyingPeriod $accompanyingPeriod)
|
||||||
{
|
{
|
||||||
$this->proxyHistoryOpenState = false;
|
$this->proxyAccompanyingPeriodOpenState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,11 +177,11 @@ class Person {
|
|||||||
* @return null|AccompanyingPeriod
|
* @return null|AccompanyingPeriod
|
||||||
*/
|
*/
|
||||||
public function getCurrentAccompanyingPeriod() {
|
public function getCurrentAccompanyingPeriod() {
|
||||||
if ($this->proxyHistoryOpenState === false) {
|
if ($this->proxyAccompanyingPeriodOpenState === false) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->history as $period) {
|
foreach ($this->accompanyingPeriods as $period) {
|
||||||
if ($period->isOpen()) {
|
if ($period->isOpen()) {
|
||||||
return $period;
|
return $period;
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ class Person {
|
|||||||
* @return \Doctrine\Common\Collections\ArrayCollection
|
* @return \Doctrine\Common\Collections\ArrayCollection
|
||||||
*/
|
*/
|
||||||
public function getAccompanyingPeriods() {
|
public function getAccompanyingPeriods() {
|
||||||
return $this->history;
|
return $this->accompanyingPeriods;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -236,7 +236,7 @@ class Person {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function isOpen() {
|
public function isOpen() {
|
||||||
return $this->proxyHistoryOpenState;
|
return $this->proxyAccompanyingPeriodOpenState;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,8 +18,11 @@ Chill\PersonBundle\Entity\AccompanyingPeriod:
|
|||||||
manyToOne:
|
manyToOne:
|
||||||
person:
|
person:
|
||||||
targetEntity: Person
|
targetEntity: Person
|
||||||
inversedBy: history
|
inversedBy: accompanyingPeriods
|
||||||
cascade: [refresh]
|
cascade: [refresh]
|
||||||
|
joinColumn:
|
||||||
|
name: person_id
|
||||||
|
referencedColumnName: id
|
||||||
closingMotive:
|
closingMotive:
|
||||||
targetEntity: Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
|
targetEntity: Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
|
||||||
nullable: true
|
nullable: true
|
||||||
|
@ -34,7 +34,8 @@ Chill\PersonBundle\Entity\Person:
|
|||||||
default: ''
|
default: ''
|
||||||
email:
|
email:
|
||||||
type: text
|
type: text
|
||||||
proxyHistoryOpenState:
|
proxyAccompanyingPeriodOpenState:
|
||||||
|
column: proxyHistoryOpenState
|
||||||
type: boolean
|
type: boolean
|
||||||
name: proxy_open
|
name: proxy_open
|
||||||
cFData:
|
cFData:
|
||||||
@ -52,7 +53,7 @@ Chill\PersonBundle\Entity\Person:
|
|||||||
inversedBy: nationals
|
inversedBy: nationals
|
||||||
nullable: true
|
nullable: true
|
||||||
oneToMany:
|
oneToMany:
|
||||||
history:
|
accompanyingPeriods:
|
||||||
targetEntity: AccompanyingPeriod
|
targetEntity: AccompanyingPeriod
|
||||||
mappedBy: person
|
mappedBy: person
|
||||||
cascade: [persist, remove, merge, detach]
|
cascade: [persist, remove, merge, detach]
|
||||||
|
@ -25,7 +25,7 @@ Chill\PersonBundle\Entity\Person:
|
|||||||
genre:
|
genre:
|
||||||
- NotNull:
|
- NotNull:
|
||||||
groups: [general, creation]
|
groups: [general, creation]
|
||||||
history:
|
accompanyingPeriods:
|
||||||
- Valid:
|
- Valid:
|
||||||
traverse: true
|
traverse: true
|
||||||
constraints:
|
constraints:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user