Skip to content

Instantly share code, notes, and snippets.

@oaltman
Created July 30, 2013 23:00
Show Gist options
  • Save oaltman/6117822 to your computer and use it in GitHub Desktop.
Save oaltman/6117822 to your computer and use it in GitHub Desktop.
Eventy
<?php
/**
* User: henry, Date: 7/31/13,Time: 12:11 AM
*/
namespace App;
use Nette\Application\UI\Form;
class ArticleForm extends Form
{
public $onLookingGood = array();
public function __construct($listener)
{
parent::__construct();
$this->addText('title',"Titul");
$this->addSubmit('submit', "Submit");
$this->onSubmit[] = callback($this, 'FormSubmitted');
}
public function FormSubmitted()
{
$this->onLookingGood($this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment