validatorSchema['is_default'], $this->validatorSchema['katao_supplier_node_list'], $this->validatorSchema['created_at'], $this->validatorSchema['updated_at']); unset($this->widgetSchema['is_default'], $this->widgetSchema['katao_supplier_node_list'], $this->widgetSchema['created_at'], $this->widgetSchema['updated_at']); $this->widgetSchema['responsible'] = new sfWidgetFormSelect(array('choices' => KataoUserPeer::getMembersByNodeToArray($this->getObject()->getId()))); if ($this->getObject()->isNew()) { $this->setDefault('responsible', sfContext::getInstance()->getUser()->getInstance()->getId()); } $this->widgetSchema['begin_at'] = new wpWidgetFormRichDate(); $this->validatorSchema['begin_at'] = new sfValidatorDateTime(array('date_format' => '@(?P\d{2}).(?P\d{2}).(?P\d{4})@')); $this->setDefault('begin_at', time()); $this->widgetSchema->setLabels(array( 'city' => 'Ville', 'responsible' => 'Délégué', 'begin_at' => 'Date de création', )); } }