public function submitDelete($file)
    {
        AdminLog::new_log('Removed ' . $file . ' from Gallery (ID ' . $this->_block->id . ')');
        $galleryData = $this->_defaultData($this->_block->getContent());
        $path = '/' . $this->_block->getPageId() . '/';
        if (isset($galleryData[$file])) {
            $path = $galleryData[$file]->path;
            unset($galleryData[$file]);
            $this->_block->updateContent(serialize($galleryData));
        }
        $fullDir = public_path() . '/uploads/system/gallery/' . $this->_block->name . $path;
        if (file_exists($fullDir . 'thumbnail/' . $file)) {
            unlink($fullDir . 'thumbnail/' . $file);
        }
        if (file_exists($fullDir . $file)) {
            unlink($fullDir . $file);
        }
        return 1;
    }
public function submitDelete($file)
    {
        AdminLog::new_log('Removed ' . $file . ' from Gallery (ID ' . $this->_block->id . ')');
        $galleryData = $this->_defaultData($this->_block->getContent());
        $path = '/' . $this->_block->getPageId() . '/';
        if (isset($galleryData[$file])) {
            $path = $galleryData[$file]->path;
            unset($galleryData[$file]);
            $this->_block->updateContent(serialize($galleryData));
        }
        $fullDir = public_path() . '/uploads/system/gallery/' . $this->_block->name . $path;
        if (file_exists($fullDir . 'thumbnail/' . $file)) {
            unlink($fullDir . 'thumbnail/' . $file);
        }
        if (file_exists($fullDir . $file)) {
            unlink($fullDir . $file);
        }
        return 1;
    }
public function submitDelete ( $ file ) { AdminLog :: new_log ( 'Removed ' . $ file . ' from Gallery (ID ' . $ this -> _block -> id . ')' ) ; $ galleryData = $ this -> _defaultData ( $ this -> _block -> getContent ( ) ) ; $ path = '/' . $ this -> _block -> getPageId ( ) . '/' ; if ( isset ( $ galleryData [ $ file ] ) ) { $ path = $ galleryData [ $ file ] -> path ; unset ( $ galleryData [ $ file ] ) ; $ this -> _block -> updateContent ( serialize ( $ galleryData ) ) ; } $ fullDir = public_path ( ) . '/uploads/system/gallery/' . $ this -> _block -> name . $ path ; if ( file_exists ( $ fullDir . 'thumbnail/' . $ file ) ) { unlink ( $ fullDir . 'thumbnail/' . $ file ) ; } if ( file_exists ( $ fullDir . $ file ) ) { unlink ( $ fullDir . $ file ) ; } return 1 ; }
Delete image from gallery
@param string $file
@return int
Delete image from gallery