protected function getLinkParameters(DOMElement $embed)
    {
        if (!$embed->hasAttribute('url')) {
            return null;
        }

        $target = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'target');
        $title = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'title');
        $id = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'id');
        $class = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'class');
        $resourceFragmentIdentifier = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'anchor_name');
        $resourceType = static::LINK_RESOURCE_URL;
        $resourceId = null;

        if ($embed->hasAttribute(EmbedLinking::TEMP_PREFIX . 'object_id')) {
            $resourceType = static::LINK_RESOURCE_CONTENT;
            $resourceId = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'object_id');
        } elseif ($embed->hasAttribute(EmbedLinking::TEMP_PREFIX . 'node_id')) {
            $resourceType = static::LINK_RESOURCE_LOCATION;
            $resourceId = $embed->getAttribute(EmbedLinking::TEMP_PREFIX . 'node_id');
        }

        $parameters = [
            'href' => $embed->getAttribute('url'),
            'resourceType' => $resourceType,
            'resourceId' => $resourceId,
            'wrapped' => $this->isLinkWrapped($embed),
        ];

        if (!empty($resourceFragmentIdentifier)) {
            $parameters['resourceFragmentIdentifier'] = $resourceFragmentIdentifier;
        }

        if (!empty($target)) {
            $parameters['target'] = $target;
        }

        if (!empty($title)) {
            $parameters['title'] = $title;
        }

        if (!empty($id)) {
            $parameters['id'] = $id;
        }

        if (!empty($class)) {
            $parameters['class'] = $class;
        }

        return $parameters;
    }