Deletes a child resource by UUID

@param string $parentUuid UUID of the parent resource
@param string $uuid UUID of the child resource
@return \Dingo\Api\Http\Response
@throws HttpException
191446
public function delete($parentUuid, $uuid)
    {
        // Check parent exists
        $parentModel = static::$parentModel;
        $parentResource = $parentModel::findOrFail($parentUuid);

        // Authorize ability to delete children model for parent
        $this->authorizeUserAction($this->parentAbilitiesRequired['delete'], $parentResource);

        $resource = static::$model::findOrFail($uuid);

        $this->authorizeUserAction('delete', $resource);

        // Check resource belongs to parent
        if ($resource->getAttribute(($parentResource->getKeyName())) != $parentResource->getKey()) {
            throw new AccessDeniedHttpException('Resource \'' . class_basename(static::$model) . '\' with given UUID ' . $uuid . ' does not belong to ' .
                'resource \'' . class_basename(static::$parentModel) . '\' with given UUID ' . $parentUuid . '; ');
        }

        $deletedCount = $resource->delete();

        if ($deletedCount < 1) {
            throw new NotFoundHttpException('Could not find a resource with that UUID to delete');
        }

        return $this->response->noContent()->setStatusCode(204);
    }
187454
@Override
	public void removeByUuid(String uuid) {
		for (CPFriendlyURLEntry cpFriendlyURLEntry : findByUuid(uuid,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpFriendlyURLEntry);
		}
	}
68754
public function get($uuid)
    {
        $model = new static::$model;

        $resource = $model::with($model::$localWith)->where($model->getKeyName(), '=', $uuid)->first();

        if (! $resource) {
            throw new NotFoundHttpException('Resource \'' . class_basename(static::$model) . '\' with given UUID ' . $uuid . ' not found');
        }

        $this->authorizeUserAction('view', $resource);

        return $this->response->item($resource, $this->getTransformer());
    }
594502
public function delete($model, $uuid)
    {
        $deletedCount = $model::destroy($uuid);

        if ($deletedCount < 1) {
            throw new NotFoundHttpException('Could not find a resource with that UUID to delete');
        }

        return $deletedCount;
    }
20035
@Override
	public void removeByUuid(String uuid) {
		for (CPDefinitionVirtualSetting cpDefinitionVirtualSetting : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionVirtualSetting);
		}
	}
663733
public function terminate($uuid)
    {
        if ($uuid instanceof Service) {
            $uuid = $uuid->getUuid();
        }

        $response = $this->httpClient->delete(
            $this->getResourceUrl($uuid),
            []
        );

        return ServiceResponse::createFromHttpResponse($response);
    }
879974
public function activationAction($uuid) {
        $request = $this->container->get('request');
        if ($this->container->get('haven_security.user_registration_manager')->activate($uuid)) {
            $this->container->get('session')->getFlashBag()->add("success", "activation.reussi");
        } else {
            throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException("page.pas.trouve");
        }

//        $templating = $this->container->get("templating");
        return new \Symfony\Component\HttpFoundation\RedirectResponse($this->container->get("router")->generate("haven_security_login_login", array("_locale" => $request->get("_locale"))));
    }
487914
public <T> void deleteChildId(Class<?> parentClass, String parentId, T object, Integer value) throws RedmineException {
        URI uri = getURIConfigurator().getChildIdURI(parentClass, parentId, object.getClass(), value);
        HttpDelete httpDelete = new HttpDelete(uri);
        String response = send(httpDelete);
        logger.debug(response);
    }
1048235
public static function parse(string $uuid): Uuid
    {
        $clean = strtolower(str_replace(['urn:', 'uuid:', '{', '}'], '', $uuid));

        if (!preg_match(static::UUID, $clean, $matches)) {
            $message = sprintf('Invalid UUID string: %s', $uuid);
            throw new DomainException($message);
        }

        $timeLow = $matches[1];
        $timeMid = $matches[2];
        $timeHiAndVersion = $matches[3];
        $clockSeqHiAndReserved = $matches[4];
        $clockSeqLow = $matches[5];
        $node = $matches[6];

        return new static($timeLow, $timeMid, $timeHiAndVersion, $clockSeqHiAndReserved, $clockSeqLow, $node);
    }
754364
public function deleteAction($id, Request $request, $menuId = null)
    {
        $this->menuId = $menuId;

        return parent::deleteAction($id, $request);
    }
72155
public function delete($listUuid)
    {
        $list = $this->findListByUuid($listUuid);

        foreach (array_keys($list) as $elementUuid) {
            $this->deleteElement($listUuid, $elementUuid);
        }
    }
909111
public static function purgeByParentAndContentObjectID( $parentNodeID, $contentObjectID )
    {
        eZDB::instance()->query(
            "DELETE FROM eznode_assignment WHERE parent_node=" . (int)$parentNodeID ." AND contentobject_id=" . (int)$contentObjectID
        );
    }
58749
public function my_removeUid($uid)
    {
        if (get_instance()->isCluster()) {
            $this->map[$this->node_name]->remove($uid);
            foreach ($this->client as $client) {
                $client->removeNodeUid($this->node_name, $uid);
            }
            if (Start::isLeader()) {
                get_instance()->pub('$SYS/uidcount', $this->countOnline());
            }
        }
        $this->my_clearUidSub($uid);
    }
384704
public function deleteIndex(IndexUUID $indexUUID)
    {
        $response = $this
            ->httpClient
            ->get(
                sprintf(
                    '/%s/indices/%s',
                    $this->getAppUUID()->composeUUID(),
                    $indexUUID->composeUUID()
                ),
                'delete',
                [],
                [],
                Http::getApisearchHeaders($this)
            );

        self::throwTransportableExceptionIfNeeded($response);
    }
595151
public static function DeleteParent($id) {
		$getparent = Dep::where('parent', '=', $id)->get();
		foreach ($getparent as $parent) {
			$check = Dep::find($parent->id);

			if ($check->parent > 0) {
				self::DeleteParent($check->id);
				@Up::del_icon($check->icon);
				$check->delete();
			} else {
				@Up::del_icon($check->icon);
				$check->delete();
			}

		}
	}
1161270
public function removeParent(string $parentId, bool $setParentsChild = true): NodeInterface
    {
        if (isset($this->_parents[$parentId])) {
            $parent = $this->getParent($parentId);

            $this->notifySubscribers(
                self::EVENT_REMOVE_PARENT,
                ['oldParents' => $this->_parents, 'parentToRemove' => $parent, 'child' => $this]
            );

            if ($setParentsChild) {
                $parent->removeChild($this->getId(), false);
            }

            unset($this->_parents[$parentId]);
        }

        return $this;
    }
1237083
@Override
	public void removeByUuid(String uuid) {
		for (CommerceCountry commerceCountry : findByUuid(uuid,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceCountry);
		}
	}