public function setInitiator(User $initiator, $sync = true) { $this->initiator = $initiator; if ($sync) { $initiator->addInitiatedTask($this); } }