kernel/classes/datatypes/ezimage/ezimagealiashandler.php
static function removeAllAliases( $contentObjectAttribute )
    {
        /** @var eZImageAliasHandler $handler */
        $handler = $contentObjectAttribute->attribute( 'content' );
        if ( !$handler->isImageOwner() )
        {
            return;
        }
        $attributeData = $handler->originalAttributeData();
        $files = eZImageFile::fetchForContentObjectAttribute( $attributeData['attribute_id'], false );
        $dirs = array();

        foreach ( $files as $filepath )
        {
            $file = eZClusterFileHandler::instance( $filepath );
            if ( $file->exists() )
            {
                $file->fileDelete( $filepath );
                $dirs[] = eZDir::dirpath( $filepath );
            }
        }
        $dirs = array_unique( $dirs );
        foreach ( $dirs as $dirpath )
        {
            eZDir::cleanupEmptyDirectories( $dirpath );
        }
        eZImageFile::removeForContentObjectAttribute( $attributeData['attribute_id'] );
    }
static function removeAllAliases( $contentObjectAttribute )
    {
        /** @var eZImageAliasHandler $handler */
        $handler = $contentObjectAttribute->attribute( 'content' );
        if ( !$handler->isImageOwner() )
        {
            return;
        }
        $attributeData = $handler->originalAttributeData();
        $files = eZImageFile::fetchForContentObjectAttribute( $attributeData['attribute_id'], false );
        $dirs = array();

        foreach ( $files as $filepath )
        {
            $file = eZClusterFileHandler::instance( $filepath );
            if ( $file->exists() )
            {
                $file->fileDelete( $filepath );
                $dirs[] = eZDir::dirpath( $filepath );
            }
        }
        $dirs = array_unique( $dirs );
        foreach ( $dirs as $dirpath )
        {
            eZDir::cleanupEmptyDirectories( $dirpath );
        }
        eZImageFile::removeForContentObjectAttribute( $attributeData['attribute_id'] );
    }
static function removeAllAliases ( $ contentObjectAttribute ) { /** @var eZImageAliasHandler $handler */ $ handler = $ contentObjectAttribute -> attribute ( 'content' ) ; if ( ! $ handler -> isImageOwner ( ) ) { return ; } $ attributeData = $ handler -> originalAttributeData ( ) ; $ files = eZImageFile :: fetchForContentObjectAttribute ( $ attributeData [ 'attribute_id' ] , false ) ; $ dirs = array ( ) ; foreach ( $ files as $ filepath ) { $ file = eZClusterFileHandler :: instance ( $ filepath ) ; if ( $ file -> exists ( ) ) { $ file -> fileDelete ( $ filepath ) ; $ dirs [ ] = eZDir :: dirpath ( $ filepath ) ; } } $ dirs = array_unique ( $ dirs ) ; foreach ( $ dirs as $ dirpath ) { eZDir :: cleanupEmptyDirectories ( $ dirpath ) ; } eZImageFile :: removeForContentObjectAttribute ( $ attributeData [ 'attribute_id' ] ) ; }
Removes all image alias files which the attribute refers to.

@param eZContentObjectAttribute
@note If you want to remove the alias information use removeAliases().

@deprecated use removeAliases, it does the same thing
Removes all image alias files which the attribute refers to .