/** * postDeleteCallback. * * This callback takes care of deleting all translations, * associated with the deleted content. */ public function postDeleteCallback(StorageEvent $event) { $subject = $event->getSubject(); $query = 'DELETE FROM ' . $prefix . 'translation where content_type = ? and content_type_id = ?'; $stmt = $this->app['db']->prepare($query); $stmt->bindValue(1, $event->getArgument('contenttype')); $stmt->bindValue(2, $subject['id']); $stmt->execute(); }