Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/webchemistry/widgets

Dynamic and global components in Nette. Configurable out of presenters.
https://github.com/webchemistry/widgets

component widget widgets

Last synced: about 1 month ago
JSON representation

Dynamic and global components in Nette. Configurable out of presenters.

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/WebChemistry/widgets.svg?branch=master)](https://travis-ci.org/WebChemistry/widgets)

## Installation
config.neon:
```yaml
extensions:
widgets: WebChemistry\Widgets\DI\WidgetsExtension
```

## Registration
config.neon
```yaml
widgets:
firstWidget: FirstWidget
secondWidget: # With multiplier
multiplier: yes
class: SecondWidget
thirdWidget: @third # As service

services:
third: ThirdWidget
```

## Using
Presenter:
```php
class BasePresenter extends Nette\Application\UI\Presenter {
use WebChemistry\Widgets\Traits\TPresenter;

}
```

Template:
```html
{widget firstWidget}
{widget secondWidget-1}
{widget secondWidget-2}
{widget thirdWidget}
```