Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Transfer of a persistent parameter between two presenters without an inheritance
<?php
// transfer of a persistent parameter between two presenters without an inheritance
// (requires nette/application 3.0.0)
trait LangParameter
{
/** @persistent */
public $lang;
}
class OnePresenter extends Nette\Application\UI\Presenter
{
use LangParameter;
}
class TwoPresenter extends Nette\Application\UI\Presenter
{
use LangParameter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.