Skip to content
No description, website, or topics provided.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
README.md
composer.json

README.md

Autowire arguments in createComponent* methods

discussion: http://forum.nette.org/cs/13791-createcomponent-injectovani-tovarnicky-primo-do-metody (czech only)

Include in application

abstract class BasePresenter extends Nette\Application\UI\Presenter
{
	use \matej21\AutowireComponentFactories;

}

Usage

class FooPresenter extends BasePresenter
{

    public function createComponentBar(BarFactory $factory)
    {
        $component = $factory->create();
        return $component;

    }
}
You can’t perform that action at this time.