public function init() { parent::init(); /* @var \Flywheel\Model\ActiveRecord $owner */ $owner = $this->getOwner(); $owner->getPrivateEventDispatcher()->addListener('onBeforeSave', array($this, 'onBeforeSave')); }