/** * Removes the given link. Returns whether successfull. Displays * an error on failure. * @param Link $link The link to delete. * @return boolean Whether the link was removed. * @throws NotFoundException When no such link exists in the database. * @throws PDOException When a database error occurs. */ public function deleteLink(Link $link) { $this->where($this->linkIdField, '=', $link->getId())->deleteOneOrFail(); }