/**
  * Renders a form tag suitable for the related Doctrine object.
  *
  * The method is automatically guessed based on the Doctrine object:
  *
  *  * if the object is new, the method is POST
  *  * if the object already exists, the method is PUT
  *
  * @param  string $url         The URL for the action
  * @param  array  $attributes  An array of HTML attributes
  *
  * @return string An HTML representation of the opening form tag
  *
  * @see sfForm
  */
 public function renderFormTag($url, array $attributes = array())
 {
     if (!isset($attributes['method'])) {
         $attributes['method'] = $this->isNew() ? 'post' : 'put';
     }
     return parent::renderFormTag($url, $attributes);
 }