/** * Extencion of the ActiveRecord save adding default permissions. * * @return boolean True for a sucessful save. */ public function save() { if ($this->id == 0) { if (parent::save()) { // adding default values $rights = new Phprojekt_Item_Rights(); $rights->saveDefaultRights($this->id); return true; } } else { return parent::save(); } }