source/Application/Model/MediaUrl.php
public function delete($sOXID = null)
    {
        $sFilePath = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sShopDir') . "/out/media/" .
                     basename($this->oxmediaurls__oxurl->value);

        if ($this->oxmediaurls__oxisuploaded->value) {
            if (file_exists($sFilePath)) {
                unlink($sFilePath);
            }
        }

        return parent::delete($sOXID);
    }
public function delete($sOXID = null)
    {
        $sFilePath = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sShopDir') . "/out/media/" .
                     basename($this->oxmediaurls__oxurl->value);

        if ($this->oxmediaurls__oxisuploaded->value) {
            if (file_exists($sFilePath)) {
                unlink($sFilePath);
            }
        }

        return parent::delete($sOXID);
    }
public function delete ( $ sOXID = null ) { $ sFilePath = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'sShopDir' ) . "/out/media/" . basename ( $ this -> oxmediaurls__oxurl -> value ) ; if ( $ this -> oxmediaurls__oxisuploaded -> value ) { if ( file_exists ( $ sFilePath ) ) { unlink ( $ sFilePath ) ; } } return parent :: delete ( $ sOXID ) ; }
Deletes record and unlinks the file

@param string $sOXID Object ID(default null)

@return bool
Deletes record and unlinks the file