eZ\Publish\Core\Repository\URLWildcardService::remove PHP Method

remove() public method

removes an url wildcard.
public remove ( eZ\Publish\API\Repository\Values\Content\URLWildcard $urlWildcard )
$urlWildcard eZ\Publish\API\Repository\Values\Content\URLWildcard the url wildcard to remove
    public function remove(URLWildcard $urlWildcard)
    {
        if ($this->repository->hasAccess('content', 'urltranslator') !== true) {
            throw new UnauthorizedException('content', 'urltranslator');
        }
        $this->repository->beginTransaction();
        try {
            $this->urlWildcardHandler->remove($urlWildcard->id);
            $this->repository->commit();
        } catch (Exception $e) {
            $this->repository->rollback();
            throw $e;
        }
    }