public addChildEvent ( |
||
$childEvent | ||
리턴 | void |
public function addChildEvent(Event $childEvent)
{
$this->childEvents->add($childEvent);
}
/** * Create a new event * * @param string $eventType * @param array $data * @param string $user * @param Event $parentEvent */ public function __construct($eventType, $data, $user = null, Event $parentEvent = null) { $this->timestamp = new \DateTime(); $this->eventType = $eventType; $this->data = $data; $this->accountIdentifier = $user; $this->parentEvent = $parentEvent; $this->childEvents = new ArrayCollection(); if ($this->parentEvent !== null) { $parentEvent->addChildEvent($this); } }