useFields(array('body')); $this->widgetSchema->setHelp('body' ,'Please enter a comment regarding to the expense.'); $this->widgetSchema->setLabel('body', 'Comment'); $this->validatorSchema['body']->setOption('required', false); } public function updateObject($values = null) { $comment = parent::updateObject($values); if ($comment->isNew()) { $comment->setCreatedBy($this->getOption('user')->getGuardUser()->getId()); } return $comment; } }