| @@ 377-389 (lines=13) @@ | ||
| 374 | * @param string $writer the header text |
|
| 375 | * @return string summary list |
|
| 376 | */ |
|
| 377 | protected function renderList($writer) |
|
| 378 | { |
|
| 379 | $header = $this->getHeaderText(); |
|
| 380 | $messages = $this->getErrorMessages(); |
|
| 381 | $content = ''; |
|
| 382 | if (strlen($header)) { |
|
| 383 | $content .= $header . "<br/>\n"; |
|
| 384 | } |
|
| 385 | foreach ($messages as $message) { |
|
| 386 | $content .= "$message<br/>\n"; |
|
| 387 | } |
|
| 388 | $writer->write($content); |
|
| 389 | } |
|
| 390 | ||
| 391 | /** |
|
| 392 | * Render the validation summary as a paragraph. |
|
| @@ 412-425 (lines=14) @@ | ||
| 409 | * @param string $writer the header text |
|
| 410 | * @return string summary bullet list |
|
| 411 | */ |
|
| 412 | protected function renderBulletList($writer) |
|
| 413 | { |
|
| 414 | $header = $this->getHeaderText(); |
|
| 415 | $messages = $this->getErrorMessages(); |
|
| 416 | $content = $header; |
|
| 417 | if (count($messages) > 0) { |
|
| 418 | $content .= "<ul>\n"; |
|
| 419 | foreach ($messages as $message) { |
|
| 420 | $content .= '<li>' . $message . "</li>\n"; |
|
| 421 | } |
|
| 422 | $content .= "</ul>\n"; |
|
| 423 | } |
|
| 424 | $writer->write($content); |
|
| 425 | } |
|
| 426 | ||
| 427 | /** |
|
| 428 | * Render the validation summary header text only. |
|