Delete an existing share.

@param int $vehicleId
@param int $sharingId

@return \Laravie\Codex\Contracts\Response
348245
public function destroy(int $vehicleId, int $sharingId): Response
    {
        $this->requiresAccessToken();

        return $this->send(
            'DELETE',
            "vehicles/{$vehicleId}/sharing/{$sharingId}",
            $this->getApiHeaders()
        );
    }
969872
public function deleteRevision($contentId, $revisionId)
    {
        $this->loadModel('Content.ContentRevisions');
        $revision = $this->ContentRevisions->find()
            ->where(['id' => $revisionId, 'content_id' => $contentId])
            ->first();

        if ($this->ContentRevisions->delete($revision, ['atomic' => true])) {
            $this->Flash->success(__d('content', 'Revision was successfully removed!'));
        } else {
            $this->Flash->danger(__d('content', 'Unable to remove this revision, please try again.'));
        }

        $this->title(__d('content', 'Editing Content Revision'));
        $this->redirect($this->referer());
    }
819517
public function delete($mediaId)
    {
        return Response::json($this->curl->post(self::DELETE.$this->access_token, json_encode([
                    'media_id' => $mediaId,
                ]
            )
        )
        );
    }
490660
public function removeMember($groupId, $userId)
    {
        $this
            ->database
            ->delete('ucms_group_access')
            ->condition('group_id', $groupId)
            ->condition('user_id', $userId)
            ->execute()
        ;

        // @todo dispatch event

        $this->touch($groupId);

        $this->resetCache();
    }
124740
public function deleteAction($folderId)
    {
        $folder = $this->get('open_orchestra_media.repository.media_folder')->find($folderId);
        if ($folder) {
            $this->denyAccessUnlessGranted(ContributionActionInterface::DELETE, $folder);
            $folderManager = $this->get('open_orchestra_media_admin.manager.media_folder');

            if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $folder)) {
                throw new FolderNotDeletableException();
            }
            $folderManager->deleteFolder($folder);

            $event = $this->get("open_orchestra_media_admin.event.folder_event");
            $event->setFolder($folder);
            $this->dispatchEvent(FolderEvents::FOLDER_DELETE, $event);
            $this->get('object_manager')->flush();
        }

        return array();
    }
584776
public function delete($id, $args = [])
    {
        $wpcli_args = buildCLIArgs(
            ['force'],
            $args
        );

        array_unshift($wpcli_args, $id);

        $this->drivers->getDriver()->wpcli('comment', 'delete', $wpcli_args);
    }
707858
public function deleteAction($categoryId, $keywordId)
    {
        $keyword = $this->getKeywordRepository()->findById($keywordId);
        $category = $this->getCategoryRepository()->findCategoryById($categoryId);
        $this->getKeywordManager()->delete($keyword, $category);

        $this->getEntityManager()->flush();

        return $this->handleView($this->view());
    }
948141
public function groupDelete($groupId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;

        $data = array_merge($data, $options);

        return $this->request($this->groupDeleteUrl, $data);
    }
485287
public function deleteAction($groupId)
    {
        $groupManager = $this->get('phlexible_user.group_manager');

        $group = $groupManager->find($groupId);
        $name = $group->getName();

        $groupManager->deleteGroup($group);

        $this->get('phlexible_message.message_poster')
            ->post(UsersMessage::create('Group "'.$group->getName().'" deleted.'));

        return new ResultResponse(true, "Group $name deleted.");
    }
364276
public function deleteResourceLinkShareKey($shareKey)
    {

        $sql = "DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . " WHERE share_key_id = '{$shareKey->getId()}'";

        $ok = mysql_query($sql);

        if ($ok) {
            $shareKey->initialize();
        }

        return $ok;

    }
778793
public function deleteSurveyPage($surveyId, $pageId)
	{
		return $this->sendRequest(
			$this->createRequest('DELETE', sprintf('surveys/%d/pages/%d', $surveyId, $pageId))
		);
	}
226340
public function delete($id)
    {
        try {
            $this->roleRepositoryInterface->delete($id);
        } catch (RolesException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('roles.index');
        }

        Flash::success(trans('dashboard::dashboard.flash.role.delete.success'));

        return redirect()->route('roles.index');
    }
824122
public function rtcDelete(string $id, string $group = '_default'): self
    {
        if ($this->rtcExists($id, $group)) {
            unset($this->runtimeCache[$group][$id]);
        }

        return $this;
    }
1175433
public function delete($id = null) {
        $role = $this->Roles->get($id);
        if ($this->request->is(['patch', 'post', 'put'])) {
            if ($this->Roles->delete($role)) {
                $this->Flash->success(__('The role has been deleted.'));
            } else {
                $this->Flash->error(__('The role could not be deleted. Please, try again.'));
            }
            return $this->redirect(['action' => 'index']);
        }
        $this->set(compact('role'));
    }
273944
public function removeAction($fileId = null)
    {
        if (!$fileId) {
            return new Response('Please provide a file id', 500);
        }

        $manager = $this->getDoctrine()->getManager();
        $repo = $this->getDoctrine()->getRepository('LibrinfoMediaBundle:File');

        $file = $repo->findOneBy([
            'id'    => $fileId,
        ]);

        if ($file !== null) {
            if ($file->isOwned()) {
                $dispatcher = $this->get('event_dispatcher');
                $event = new GenericEvent($file);
                $dispatcher->dispatch(UploadControllerEventListener::REMOVE_ENTITY, $event);
            }

            $name = '' . $file->getName();
            $manager->remove($file);
            $manager->flush();

            return new Response($name . ' removed successfully', 200);
        } else {
            return new Response('the file cannot be removed', 401);
        }
    }
1066276
public function update(int $vehicleId, int $sharingId, ?string $description, ?string $duration = '1D'): Response
    {
        $this->requiresAccessToken();

        return $this->sendJson(
            'PATCH',
            "vehicles/{$vehicleId}/sharing/{$sharingId}",
            $this->getApiHeaders(),
            $this->mergeApiBody(\compact('description', 'duration'))
        );
    }
1366823
public function Delete($RoleID = FALSE) {
		if(!$this->_Permission())
			return;

		$this->Title(T('Delete Role'));
      $this->AddSideMenu('dashboard/role');
      
      $Role = $this->RoleModel->GetByRoleID($RoleID);
      if ($Role->Deletable == '0')
         $this->Form->AddError('You cannot delete this role.');
      
      // Make sure the form knows which item we are deleting.
      $this->Form->AddHidden('RoleID', $RoleID);
      
      // Figure out how many users will be affected by this deletion
      $this->AffectedUsers = $this->RoleModel->GetUserCount($RoleID);
      
      // Figure out how many users will be orphaned by this deletion
      $this->OrphanedUsers = $this->RoleModel->GetUserCount($RoleID, TRUE);

      // Get a list of roles other than this one that can act as a replacement
      $this->ReplacementRoles = $this->RoleModel->GetByNotRoleID($RoleID);
      
      if ($this->Form->AuthenticatedPostBack()) {
         // Make sure that a replacement role has been selected if there were going to be orphaned users
         if ($this->OrphanedUsers > 0) {
            $Validation = new Gdn_Validation();
            $Validation->ApplyRule('ReplacementRoleID', 'Required', 'You must choose a replacement role for orphaned users.');
            $Validation->Validate($this->Form->FormValues());
            $this->Form->SetValidationResults($Validation->Results());
         }
         if ($this->Form->ErrorCount() == 0) {
            // Go ahead and delete the Role
            $this->RoleModel->Delete($RoleID, $this->Form->GetValue('ReplacementRoleID'));
            $this->RedirectUrl = Url('dashboard/role');
            $this->InformMessage(T('Deleting role...'));
         }
      }
      $this->Render();
   }