Delete my locks.

@return ResultResponse
@Route("/deletemy", name="locks_delete_my")
487858
public function deletemyAction()
    {
        $uid = $this->getUser()->getId();

        $lockManager = $this->get('phlexible_element.element_lock_manager');
        $myLocks = $lockManager->findBy(['userId' => $uid]);

        foreach ($myLocks as $lock) {
            $lockManager->deleteLock($lock);
        }

        return new ResultResponse(true, 'My locks released.');
    }
493226
public function delete()
    {
        if (empty($this->id)) {
            $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size);
        }
        @shmop_delete($this->id);
        @shmop_close($this->id);

        return true;

    }
1093423
public function revoke()
    {
        if (!isset($this->_links->self->href)) {
            return $this;
        }

        $body = null;
        if($this->client->usesOAuth()) {
            $body = json_encode([
                "testmode" => $this->mode === "test" ? true : false
            ]);
        }

        $result = $this->client->performHttpCallToFullUrl(
            MollieApiClient::HTTP_DELETE,
            $this->_links->self->href,
            $body
        );

        return $result;
    }
181161
public function lock()
    {
        $result = null;

        $context = $this->getContext();
        $context->table = $this->getBase();

        if ($this->invokeCommand('before.lock', $context) !== false)
        {
            if ($this->isConnected()) {
                $context->result = $this->getDriver()->lock($this->getBase());
            }

            $this->invokeCommand('after.lock', $context);
        }

        return $context->result;
    }
635760
public function clear(): Response
	{
		$this->clearBody();

		$this->headers->clear();

		$this->cookies->clear();

		return $this;
	}
1160622
public function deleteAction()
	{
		if( config( 'shop.authorize', true ) ) {
			$this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] );
		}

		$cntl = $this->createAdmin();

		if( ( $html = $cntl->delete() ) == '' ) {
			return $cntl->getView()->response();
		}

		return $this->getHtml( $html );
	}
705137
public function purge() {
        if ($this->isready) {
            // Only use delete multi if we have the correct extension installed and if the memcached
            // server is shared (flushing the cache is quicker otherwise).
            $candeletemulti = ($this->candeletemulti && $this->isshared);

            if ($this->clustered) {
                foreach ($this->setconnections as $connection) {
                    if ($candeletemulti) {
                        $keys = self::get_prefixed_keys($connection, $this->prefix);
                        $connection->deleteMulti($keys);
                    } else {
                        // Oh damn, this isn't multi-site safe.
                        $connection->flush();
                    }
                }
            } else if ($candeletemulti) {
                $keys = self::get_prefixed_keys($this->connection, $this->prefix);
                $this->connection->deleteMulti($keys);
            } else {
                // Oh damn, this isn't multi-site safe.
                $this->connection->flush();
            }
        }
        // It never fails. Ever.
        return true;
    }
1110319
protected function RemovalObject()
    {
        $id = Request::PostData('delete');
        return $id ? Usergroup::Schema()->ByID($id) : null;
    }
443768
public function delete($id)
    {
        $entry = WinkAuthor::findOrFail($id);

        if ($entry->posts()->count()) {
            return response()->json(['message' => 'Please remove the author\'s posts first.'], 402);
        }

        if ($entry->id == auth('wink')->user()->id) {
            return response()->json(['message' => 'You cannot delete yourself.'], 402);
        }

        $entry->delete();
    }
587917
public function deleteHlblockIfExists($hlblockName) {
        $item = $this->getHlblock($hlblockName);
        if (!$item) {
            return false;
        }

        return $this->deleteHlblock($item['ID']);
    }
1033846
public function delete()
    {
        Manager::getInstance()->get($this)->refreshRelations();
        $pmk = $this->getPrimaryKey();
        $sql = Sql::createSql($this->getAdapter())
            ->delete($this->getTableName())
            ->where(["{$pmk} = :id" => [':id' => $this->$pmk]]);
        $event = new Delete([
            'primaryKey' => $this->$pmk,
            'abort' => false
        ]);
        $this->getEventManager()->trigger(Delete::BEFORE_DELETE, $this, $event);

        if ($event->abort) {
            return false;
        }
        $result = $sql->execute();
        $this->getEventManager()->trigger(Delete::AFTER_DELETE, $event);
        return $result > 0;
    }
1011160
public function delete()
    {
        $data = $this->sendRequest($this->getUri(), 'delete');

        return new Result($data, $this->getUri(), $this->client, get_called_class());
    }
93123
public function clear() {
		$this->_value = null;
		$this->getConnection()->getClient()->delete($this->name);
		return $this;
	}
511047
public function deleteAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth(static::CONTROLLER_CHECK_RESOURCE, Dealer::getModuleCode(),
                AccessManager::DELETE)
        ) {
            return $response;
        }

        $con = Propel::getConnection();
        $con->beginTransaction();
        try {
            // Check token
            $this->getTokenProvider()->checkToken(
                $this->getRequest()->query->get("_token")
            );

            $this->getService()->deleteFromId($this->getRequest()->request->get(static::CONTROLLER_ENTITY_NAME . "_id"));
            $con->commit();
            if ($this->getRequest()->request->get("success_url") == null) {
                return $this->redirectToListTemplate();
            } else {
                return new RedirectResponse(URL::getInstance()->absoluteUrl($this->getRequest()->request->get("success_url")));
            }
        } catch (\Exception $e) {
            $con->rollBack();

            return $this->renderAfterDeleteError($e);
        }
    }
954363
public function delete()
    {
        $table = $this->table;
        $pk = $this->_data[$table->getPrimaryKey()];

        $query = "DELETE FROM {$table->getTableName()} WHERE ";
        $query .= "{$table->getPrimaryKey()} = $pk";

        return $this->_delete($query);
    }
1060175
public function deleteAction($id)
    {
        $response = $this->getResponse();
        $this->model->deleteRecord($id);
        $response->setStatusCode(Response::HTTP_NO_CONTENT);

        return $response;
    }
1260152
public function unlockAction(Request $request)
    {
        $unlockId = (int) $request->get('id');
        $force = $request->get('force', false);
        $language = $request->get('language');

        $elementService = $this->get('phlexible_element.element_service');
        $lockManager = $this->get('phlexible_element.element_lock_manager');

        $element = $elementService->findElement($unlockId);
        $userId = $this->getUser()->getId();

        if (!$force && !$lockManager->isLockedByUser($element, $userId)) {
            return new ResultResponse(false, 'Not locked by you.');
        } elseif (!$lockManager->isLocked($element)) {
            return new ResultResponse(false, 'Not locked.');
        } else {
            try {
                $lockManager->unlock($element);

                return new ResultResponse(true, 'Lock removed.');
            } catch (\Exception $e) {
                return new ResultResponse(false, $e->getMessage());
            }
        }
    }