protected function _actionRemovephoto($context)
    {
        $lastPhoto = ($this->getItem()->photos->getTotal() > 1) ? false : true;
        $this->getItem()->removePhoto($this->photo);

        if ($lastPhoto) {
            $this->getResponse()->status = 204;

            return;
        } else {
            return $this->getItem();
        }
    }
protected function _actionRemovephoto($context)
    {
        $lastPhoto = ($this->getItem()->photos->getTotal() > 1) ? false : true;
        $this->getItem()->removePhoto($this->photo);

        if ($lastPhoto) {
            $this->getResponse()->status = 204;

            return;
        } else {
            return $this->getItem();
        }
    }
protected function _actionRemovephoto ( $ context ) { $ lastPhoto = ( $ this -> getItem ( ) -> photos -> getTotal ( ) > 1 ) ? false : true ; $ this -> getItem ( ) -> removePhoto ( $ this -> photo ) ; if ( $ lastPhoto ) { $ this -> getResponse ( ) -> status = 204 ; return ; } else { return $ this -> getItem ( ) ; } }
Removes a list of photos from an set.

@return object ComPhotosDomainEntitySet

@param object POST data
Removes a list of photos from an set .