public function packageRemoveSnippet($data) {
        $response=CodeBank_ClientAPI::responseBase();
        
        //Ensure logged in
        if(!Permission::check('CODE_BANK_ACCESS')) {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied');
        
            return $response;
        }
        
        
        $package=SnippetPackage::get()->byID(intval($data->packageID));
        if(!empty($package) && $package!==false && $package->ID!=0) {
            $package->Snippets()->removeByID(intval($data->snippetID));
            
            
            $response['status']='HELO';
        }else {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.PACKAGE_NOT_FOUND', '_Package not found');
        }
        
        return $response;
    }
public function packageRemoveSnippet($data) {
        $response=CodeBank_ClientAPI::responseBase();
        
        //Ensure logged in
        if(!Permission::check('CODE_BANK_ACCESS')) {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied');
        
            return $response;
        }
        
        
        $package=SnippetPackage::get()->byID(intval($data->packageID));
        if(!empty($package) && $package!==false && $package->ID!=0) {
            $package->Snippets()->removeByID(intval($data->snippetID));
            
            
            $response['status']='HELO';
        }else {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.PACKAGE_NOT_FOUND', '_Package not found');
        }
        
        return $response;
    }
public function packageRemoveSnippet ( $ data ) { $ response = CodeBank_ClientAPI :: responseBase ( ) ; //Ensure logged in if ( ! Permission :: check ( 'CODE_BANK_ACCESS' ) ) { $ response [ 'status' ] = 'EROR' ; $ response [ 'message' ] = _t ( 'CodeBankAPI.PERMISSION_DENINED' , '_Permission Denied' ) ; return $ response ; } $ package = SnippetPackage :: get ( ) -> byID ( intval ( $ data -> packageID ) ) ; if ( ! empty ( $ package ) && $ package !== false && $ package -> ID != 0 ) { $ package -> Snippets ( ) -> removeByID ( intval ( $ data -> snippetID ) ) ; $ response [ 'status' ] = 'HELO' ; } else { $ response [ 'status' ] = 'EROR' ; $ response [ 'message' ] = _t ( 'CodeBankAPI.PACKAGE_NOT_FOUND' , '_Package not found' ) ; } return $ response ; }
Removes a snippet from a package
@param {stdClass} $data Data passed from ActionScript
@return {array} Standard response base
Removes a snippet from a package