public function configure() { parent::configure(); $this->setWidgets(array('body' => new sfWidgetFormTextarea())); $this->setValidators(array('body' => new sfValidatorString())); $this->embedForm('Commenter', new CommenterForm($this->getObject()->getCommenter())); $this->widgetSchema->setLabel('body', 'Your Comment'); $this->widgetSchema->setNameFormat('comment[%s]'); }
protected function doUpdateObject($values) { $values['body'] = nl2br($values['body']); // if comment is a reply, update the body value if (isset($values['reply']) && $values['reply'] != "" && ($obj = Doctrine::getTable('Comment')->find($values['reply']))) { $tmp = commentTools::setQuote($obj->getAuthor(), $obj->body); $values['body'] = $tmp . $values['body']; } else { $values['reply'] = null; } parent::doUpdateObject($values); }
public function configure() { parent::setup(); unset($this['created_at'], $this['updated_at'], $this['created_by'], $this['updated_by']); }
public function configure() { parent::configure(); // Unset automatic fields like 'created_at', 'updated_at', 'created_by', 'updated_by' $this->unsetAutoFields(); }
public function configure() { parent::configure(); unset($this['created_at'], $this['updated_at']); $this->configure_specific(); }