rudloff / drupal-link-psr13
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
Requires
- php: >=8.0
- drupal/core: ^9
- psr/link: ^2.0
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();