public function delete()
    {
        if (!$this->hasRequestParameter('uri') || !$this->hasRequestParameter('path') || !$this->hasRequestParameter('lang')) {
            throw new common_exception_MissingParameter();
        }

        $item = $this->getResource($this->getRequestParameter('uri'));
        $itemLang = $this->getRequestParameter('lang');

        $resolver = new ItemMediaResolver($item, $itemLang);
        $asset = $resolver->resolve($this->getRequestParameter('path'));
        $deleted = $asset->getMediaSource()->delete($asset->getMediaIdentifier());

        return $this->returnJson(array('deleted' => $deleted));
    }
public function delete()
    {
        if (!$this->hasRequestParameter('uri') || !$this->hasRequestParameter('path') || !$this->hasRequestParameter('lang')) {
            throw new common_exception_MissingParameter();
        }

        $item = $this->getResource($this->getRequestParameter('uri'));
        $itemLang = $this->getRequestParameter('lang');

        $resolver = new ItemMediaResolver($item, $itemLang);
        $asset = $resolver->resolve($this->getRequestParameter('path'));
        $deleted = $asset->getMediaSource()->delete($asset->getMediaIdentifier());

        return $this->returnJson(array('deleted' => $deleted));
    }
public function delete ( ) { if ( ! $ this -> hasRequestParameter ( 'uri' ) || ! $ this -> hasRequestParameter ( 'path' ) || ! $ this -> hasRequestParameter ( 'lang' ) ) { throw new common_exception_MissingParameter ( ) ; } $ item = $ this -> getResource ( $ this -> getRequestParameter ( 'uri' ) ) ; $ itemLang = $ this -> getRequestParameter ( 'lang' ) ; $ resolver = new ItemMediaResolver ( $ item , $ itemLang ) ; $ asset = $ resolver -> resolve ( $ this -> getRequestParameter ( 'path' ) ) ; $ deleted = $ asset -> getMediaSource ( ) -> delete ( $ asset -> getMediaIdentifier ( ) ) ; return $ this -> returnJson ( array ( 'deleted' => $ deleted ) ) ; }
Delete a file from the item directory

@throws common_exception_MissingParameter
Delete a file from the item directory