public function add(Event $nodeEvent) { if (!$this->isEnabled()) { throw new Exception('Event log not enabled', 1418464935); } if ($nodeEvent->getParentEvent() === null) { $this->eventRepository->add($nodeEvent); } }