| | 259 | * Renders a form tag suitable for the related Propel object. |
|---|
| | 260 | * |
|---|
| | 261 | * The method is automatically guessed based on the Propel object: |
|---|
| | 262 | * |
|---|
| | 263 | * * if the object is new, the method is POST |
|---|
| | 264 | * * if the object already exists, the method is PUT |
|---|
| | 265 | * |
|---|
| | 266 | * @param string $url The URL for the action |
|---|
| | 267 | * @param array $attributes An array of HTML attributes |
|---|
| | 268 | * |
|---|
| | 269 | * @return string An HTML representation of the opening form tag |
|---|
| | 270 | * |
|---|
| | 271 | * @see sfForm |
|---|
| | 272 | */ |
|---|
| | 273 | public function renderFormTag($url, array $attributes = array()) |
|---|
| | 274 | { |
|---|
| | 275 | $attributes['method'] = $this->getObject()->isNew() ? 'POST' : 'PUT'; |
|---|
| | 276 | |
|---|
| | 277 | return parent::renderFormTag($url, $attributes); |
|---|
| | 278 | } |
|---|
| | 279 | |
|---|
| | 280 | /** |
|---|