Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.
/ link-factory Public archive

[DEPRECATED] Nette Framework link factory indepedent of presenter

License

Notifications You must be signed in to change notification settings

nextras/link-factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nextras LinkFactory

====================

This repository is deprecated.
The same functionality is provided by Nette Framework itself.
Use LinkGenerator in nette/application.

====================

Build Status Downloads this Month Stable version HHVM Status

Installation

Add to your composer.json:

"require": {
	"nextras/link-factory": "~1.0"
}

Example

use Nextras\Application\LinkFactory;

class Example
{
	/** @var LinkFactory */
	private $linkFactory;

	public function __construct(LinkFactory $linkFactory)
	{
		$this->linkFactory = $linkFactory;
	}

	public function doSomething()
	{
		// relative link with optional fragment (#comments) and parameters
		$link = $this->linkFactory->link('Products:view#comments', ['id' => 123]);

		// absolute link starts with '//'
		$link = $this->linkFactory->link('//Homepage:default');
	}
}

About

[DEPRECATED] Nette Framework link factory indepedent of presenter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages