Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cvette/flow-web-link
WebLink Package for Neos Flow
https://github.com/cvette/flow-web-link
psr-13
Last synced: about 2 months ago
JSON representation
WebLink Package for Neos Flow
- Host: GitHub
- URL: https://github.com/cvette/flow-web-link
- Owner: cvette
- License: mit
- Created: 2017-11-01T20:38:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-05T17:00:37.000Z (about 7 years ago)
- Last Synced: 2024-05-02T01:44:45.302Z (8 months ago)
- Topics: psr-13
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Latest Stable Version](https://poser.pugx.org/cvette/flow-web-link/v/stable)](https://packagist.org/packages/cvette/flow-web-link) [![Total Downloads](https://poser.pugx.org/cvette/flow-web-link/downloads)](https://packagist.org/packages/cvette/flow-web-link) [![License](https://poser.pugx.org/cvette/flow-web-link/license)](https://packagist.org/packages/cvette/flow-web-link)
# WebLink Package for Neo Flow
This Neos Flow package provides methods to manage links between resources and advise clients to preload and prefetch resources through HTTP and HTTP/2 pushes.
## Usage
You can add a link header in three different ways:
### Using the Fusion Prototype
This will output a Html link tag with the given "rel" attribute and set the Http link header for the response.link = Vette.WebLink:Link {
href = 'http://foo.bar/x.y'
rel = 'preload'
}### Using the EEL Helper
If you use this EEL helper, make sure the containing Fusion prototype is uncached.$href = ${Vette.WebLink.link('http://foo.bar/x.y', 'preload')}
### Adding a Link Header via the WebLink Service
/**
* @Flow\Inject
* @var WebLinkService
**/
protected $webLinkService;
...
$this->webLinkService->link('http:foo.bar/x.y', 'preload');