plugin/favourite/Manager/FavouriteManager.php
public function deleteFavourite(User $user, ResourceNode $resourceNode)
    {
        $favourite = $this->repo->findOneBy(['user' => $user, 'resourceNode' => $resourceNode]);

        if (!empty($favourite)) {
            $this->om->remove($favourite);
            $this->om->flush();
        }
    }
public function deleteFavourite(User $user, ResourceNode $resourceNode)
    {
        $favourite = $this->repo->findOneBy(['user' => $user, 'resourceNode' => $resourceNode]);

        if (!empty($favourite)) {
            $this->om->remove($favourite);
            $this->om->flush();
        }
    }
public function deleteFavourite ( User $ user , ResourceNode $ resourceNode ) { $ favourite = $ this -> repo -> findOneBy ( [ 'user' => $ user , 'resourceNode' => $ resourceNode ] ) ; if ( ! empty ( $ favourite ) ) { $ this -> om -> remove ( $ favourite ) ; $ this -> om -> flush ( ) ; } }
Deletes favourite for given user and resource.

@param User         $user
@param ResourceNode $resourceNode
Deletes favourite for given user and resource .