Signal support for form controls
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/Nella/Forms/SignalControl
tests
.gitattributes
.gitignore
.travis.composer.php
.travis.yml
LICENSE.md
README.md
composer.json

README.md

Signal form control for Nette Framework

Build Status SensioLabsInsight Status Latest Stable Version Composer Downloads Dependency Status HHVM Status

Installation

composer require nella/forms-signal-control

Usage


class InteractiveControl extends \Nette\Forms\Controls\TextInput
{

    use \Nella\Forms\SignalControl\SignalControl;

    public function handleMySignal($value)
    {
        // do something
    }

    public function getControl()
    {
        /** @var \Nette\Utils\Html $el */
        $el = parent::getControl();

        $el->data('signal-link', $this->link('//mySignal!', array('value' => 'someValue')));

        return $el;
    }

}

$form = new \Nette\Application\UI\Form;
$form->addComponent(new InteractiveControl('Test'), 'test');

License

Signal form control for Nette Framework is licensed under the MIT License - see the LICENSE file for details