public function deleteImageSetBySlug($slug)
    {
        $imageSet = $this->getImageSet();

        foreach ($imageSet as $key => $set) {
            if ($set->slug == $slug) {
                unset($imageSet[$key]);
            }
        }
        $imageSet = array_values($imageSet);
        $this->repository->imageSet = $imageSet;
        $this->save();
    }
public function deleteImageSetBySlug($slug)
    {
        $imageSet = $this->getImageSet();

        foreach ($imageSet as $key => $set) {
            if ($set->slug == $slug) {
                unset($imageSet[$key]);
            }
        }
        $imageSet = array_values($imageSet);
        $this->repository->imageSet = $imageSet;
        $this->save();
    }
public function deleteImageSetBySlug ( $ slug ) { $ imageSet = $ this -> getImageSet ( ) ; foreach ( $ imageSet as $ key => $ set ) { if ( $ set -> slug == $ slug ) { unset ( $ imageSet [ $ key ] ) ; } } $ imageSet = array_values ( $ imageSet ) ; $ this -> repository -> imageSet = $ imageSet ; $ this -> save ( ) ; }
Delete Image Set by its slug

@param $slug

@throws \Exception
Delete Image Set by its slug