mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 11:19:16 +02:00
QuickTable: quick & dirty way to render objects
This commit is contained in:
parent
06f9477bc1
commit
1d2cc2b12d
@ -15,6 +15,7 @@ use Icinga\Web\Request;
|
|||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use Icinga\Web\Widget;
|
use Icinga\Web\Widget;
|
||||||
use Icinga\Web\Widget\Paginator;
|
use Icinga\Web\Widget\Paginator;
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
abstract class QuickTable implements Paginatable
|
abstract class QuickTable implements Paginatable
|
||||||
{
|
{
|
||||||
@ -79,6 +80,8 @@ abstract class QuickTable implements Paginatable
|
|||||||
$value = '-';
|
$value = '-';
|
||||||
} elseif (is_array($val)) {
|
} elseif (is_array($val)) {
|
||||||
$value = nl2br($this->view()->escape(implode("\n", $val)));
|
$value = nl2br($this->view()->escape(implode("\n", $val)));
|
||||||
|
} elseif ($val instanceof stdClass) {
|
||||||
|
$value = '<pre>' . $this->view()->escape(print_r($val, 1)) . '</pre>';
|
||||||
} else {
|
} else {
|
||||||
$value = $this->view()->escape($val);
|
$value = $this->view()->escape($val);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user