public function deleteCover(GHEADER_BOL_Cover $cover) { $coverPath = $this->getCoverPath($cover); $event = new OW_Event(GHEADER_BOL_Service::EVENT_REMOVE, array('groupId' => $cover->groupId, 'id' => $cover->id, 'file' => $cover->file, 'status' => $cover->status, 'path' => $coverPath, 'src' => $this->getCoverUrl($cover), 'data' => $cover->getSettings())); OW::getEventManager()->trigger($event); $this->coverDao->deleteById($cover->id); unlink($coverPath); }