clear01/forms-signal-control

Signal support for form controls.

v1.0.2 2018-04-24 10:48 UTC

This package is auto-updated.

Last update: 2024-04-10 20:06:30 UTC


README

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

Installation

composer require clear01/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