public function __construct($owner = null) { parent::__construct($owner); $events = array(ViewController::EVENT_ON_POST_FORM => 'onPostForm'); foreach ($events as $event => $handlerMethod) { $owner->attachEventHandler($event, array($this, $handlerMethod)); } }