modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-02-15 13:39:58 +04:00
parent bdd6d959a2
commit c154d44da1
1 changed files with 22 additions and 0 deletions

View File

@ -435,7 +435,9 @@ class CTable extends ComponentPrintable implements IParametrable {
vo::stable(["class" => "table", $this->table()]);
vo::sthead($this->thead());
$this->printBeforeHeader();
$this->printHeader($this->headers);
$this->printAfterHeader();
vo::ethead();
vo::stbody($this->tbody());
@ -486,6 +488,26 @@ class CTable extends ComponentPrintable implements IParametrable {
return null;
}
/** contenu à afficher avant la ligne */
function beforeHeader(): ?iterable {
return null;
}
function printBeforeHeader(): void {
$beforeHeaderContents = $this->beforeHeader();
if ($beforeHeaderContents !== null) vo::tr($beforeHeaderContents);
}
/** contenu à afficher après la ligne */
function afterHeader(): ?iterable {
return null;
}
function printAfterHeader(): void {
$afterHeaderContents = $this->afterHeader();
if ($afterHeaderContents !== null) vo::tr($afterHeaderContents);
}
function printHeader(array $headers): void {
vo::print($this->headerTr($headers));
}