Definition at line 4 of file Html.php.
◆ buildTable()
static Gettext\Languages\Exporter\Html::buildTable |
( |
|
$languages, |
|
|
|
$forDocs |
|
) |
| |
|
staticprotected |
Definition at line 17 of file Html.php.
References $lc, $name, and array.
19 $prefix = $forDocs ?
' ' :
'';
21 $lines[] = $prefix.
'<table'.($forDocs ?
' class="table table-bordered table-condensed table-striped"' :
'').
'>';
22 $lines[] = $prefix.
' <thead>';
23 $lines[] = $prefix.
' <tr>';
24 $lines[] = $prefix.
' <th>Language code</th>';
25 $lines[] = $prefix.
' <th>Language name</th>';
26 $lines[] = $prefix.
' <th># plurals</th>';
27 $lines[] = $prefix.
' <th>Formula</th>';
28 $lines[] = $prefix.
' <th>Plurals</th>';
29 $lines[] = $prefix.
' </tr>';
30 $lines[] = $prefix.
' </thead>';
31 $lines[] = $prefix.
' <tbody>';
32 foreach ($languages as
$lc) {
33 $lines[] = $prefix.
' <tr>';
34 $lines[] = $prefix.
' <td>'.$lc->id.
'</td>';
35 $name = self::h($lc->name);
36 if (isset($lc->supersededBy)) {
37 $name .=
'<br /><small><span>Superseded by</span> '.$lc->supersededBy.
'</small>';
39 $lines[] = $prefix.
' <td>'.
$name.
'</td>';
40 $lines[] = $prefix.
' <td>'.count($lc->categories).
'</td>';
41 $lines[] = $prefix.
' <td>'.self::h($lc->formula).
'</td>';
43 foreach ($lc->categories as $c) {
44 $cases[] =
'<li><span>'.$c->id.
'</span><code>'.self::h($c->examples).
'</code></li>';
46 $lines[] = $prefix.
' <td><ol'.($forDocs ?
' class="cases"' :
'').
' start="0">'.implode(
'', $cases).
'</ol></td>';
47 $lines[] = $prefix.
' </tr>';
49 $lines[] = $prefix.
' </tbody>';
50 $lines[] = $prefix.
'</table>';
52 return implode(
"\n", $lines);
Create styles array
The data for the language used.
◆ getDescription()
static Gettext\Languages\Exporter\Html::getDescription |
( |
| ) |
|
|
static |
◆ h()
static Gettext\Languages\Exporter\Html::h |
( |
|
$str | ) |
|
|
staticprotected |
Definition at line 13 of file Html.php.
15 return htmlspecialchars($str, ENT_COMPAT,
'UTF-8');
◆ toStringDo()
static Gettext\Languages\Exporter\Html::toStringDo |
( |
|
$languages | ) |
|
|
staticprotected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/gettext/languages/src/Exporter/Html.php