public function removeOptionById($id) { $answers = $this->answerDao->findByOptionId($id); foreach ($answers as $answer) { $this->removeAnswerByDto($answer); } $this->optionDao->deleteById($id); OW::getEventManager()->trigger(new OW_Event(self::EVENT_OPTION_REMOVE, array('id' => $id))); }