rudloff/drupal-link-psr13

This package is abandoned and no longer maintained. No replacement package was suggested.

Convert Drupal URL objects to PSR-13 compliant link objects

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/rudloff/drupal-link-psr13

0.1.0 2022-02-09 19:38 UTC

This package is auto-updated.

Last update: 2024-01-27 19:24:54 UTC


README

This library converts Drupal URL objects to PSR-13 compliant link objects.

It can be used to pass links generated by Drupal to a PSR-13 library like Symfony WebLink.

Usage

// Create a link object from a Drupal URL
$link = new \DrupalLinkPsr\Link(
    \Drupal\Core\Url::fromUri('https://example.com/')
);

// Get an array of attributes
$link->getAttributes();

// Get the URL
$link->getHref();