public function __construct($object = null, $options = array(), $CSRFSecret = null)
{
$class = $this->getModelName();
if (!$object) {
$this->object = new $class();
} else {
if (!$object instanceof $class) {
throw new sfException(sprintf('The "%s" form only accepts a "%s" object.', get_class($this), $class));
}
$this->object = $object;
$this->isNew = $this->getObject()->isNew();
}
parent::__construct(array(), $options, $CSRFSecret);
$this->updateDefaultsFromObject();
}