Skip to content

Instantly share code, notes, and snippets.

@delbono
Created August 25, 2010 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delbono/549509 to your computer and use it in GitHub Desktop.
Save delbono/549509 to your computer and use it in GitHub Desktop.
*/
class OrdinativiHealthStateForm extends BaseOrdinativiHealthStateForm
{
public function configure()
{
$this->useFields(array('name'));
$this->widgetSchema->setLabels(array(
'name' => 'Nome',
));
}
protected function doSave($con = null)
{
$user = self::getValidUser();
if (is_null($con))
{
$con = $this->getConnection();
}
$this->updateObject(array('user_id'=>$user->getGuardUser()->getId(), 'name'=>'ssss'));
$this->object->save($con);
$this->saveEmbeddedForms($con);
return parent::doSave($con);
}
public function updateObject($values = null)
{
$object = parent::updateObject($values);
return $object;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment