frontend/modules/elfind/src/elFinderVolumeLocalFileSystem.class.php
/**
     * Cancel sharing for file or directory
     *
     * @param string $path
     * @return array
     */
Cancel sharing for file or directory
@param string $path
@return array
Cancel sharing for file or directory @param string $path @return array
protected function unshareCE($path)
    {
        $regEvent = $this->event_unshare($path);
        if ($regEvent['result'] !== 'success') {
            return ['status' => false, 'info' => self::getErrTxt($regEvent['info'])];
        }
        $regEvent['data']['hash']           = $this->encode($path);
        $regEvent['data']['shared_element'] = '';
        $regEvent['data']['file_shared']    = false;
        $User = Yii::$app->user->identity;
        $regEvent['data']['payed'] = (!in_array($User->license_type, [Licenses::TYPE_FREE_DEFAULT])) ? true : false;
        $ret = [
            'status' => true,
            'data' => $regEvent['data'],
        ];
        if (isset($regEvent['event_data']) && $regEvent['event_data']) {
            $ret['event_data'] = $regEvent['event_data'];
        }
        return $ret;
    }
protected function unshareCE ( $ path ) { $ regEvent = $ this -> event_unshare ( $ path ) ; if ( $ regEvent [ 'result' ] !== 'success' ) { return [ 'status' => false , 'info' => self :: getErrTxt ( $ regEvent [ 'info' ] ) ] ; } $ regEvent [ 'data' ] [ 'hash' ] = $ this -> encode ( $ path ) ; $ regEvent [ 'data' ] [ 'shared_element' ] = '' ; $ regEvent [ 'data' ] [ 'file_shared' ] = false ; $ User = Yii :: $ app -> user -> identity ; $ regEvent [ 'data' ] [ 'payed' ] = ( ! in_array ( $ User -> license_type , [ Licenses :: TYPE_FREE_DEFAULT ] ) ) ? true : false ; $ ret = [ 'status' => true , 'data' => $ regEvent [ 'data' ] , ] ; if ( isset ( $ regEvent [ 'event_data' ] ) && $ regEvent [ 'event_data' ] ) { $ ret [ 'event_data' ] = $ regEvent [ 'event_data' ] ; } return $ ret ; }
Cancel sharing for file or directory
 @param string $path
 @return array
Cancel sharing for file or directory @param string $path @return array
//return $this->setError(self::getErrTxt($regEvent['info'])); /** @var \common\models\Users $User */ //return ['status' => true, 'data' => $regEvent['data'], 'event_data' => $regEvent['event_data']];