Controller/Frontend/FavoriteController.php
public function removeFavoriteAdAction(Ad $ad)
    {
        $customer = $this->getUser();
        if (!is_object($customer) || !$customer instanceof Customer) {
            return $this->redirectToRoute("miky_app_home_index");
        }
        $customer->removeFavoriteAd($ad);
        $this->get("miky_customer_manager")->updateUser($customer);
        return $this->redirectToRoute("miky_app_favorite_ads_list");
    }
public function removeFavoriteAdAction(Ad $ad)
    {
        $customer = $this->getUser();
        if (!is_object($customer) || !$customer instanceof Customer) {
            return $this->redirectToRoute("miky_app_home_index");
        }
        $customer->removeFavoriteAd($ad);
        $this->get("miky_customer_manager")->updateUser($customer);
        return $this->redirectToRoute("miky_app_favorite_ads_list");
    }
@return Response|RedirectResponse

@throws AccessDeniedException