add hook afterPrint
This commit is contained in:
@ -1,11 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once "../vendor/autoload.php";
|
||||
require_once "../vendor/autoload.php";
|
||||
|
||||
use Itguild\Tables\ListJsonTable;
|
||||
|
||||
$json = file_get_contents('simple.json');
|
||||
|
||||
$table = new ListJsonTable($json);
|
||||
$table->setBeforePrintCell(function ($key, $data) {
|
||||
return $key == "email" ? "<span style='color: aqua'>$data</span>" : $data;
|
||||
});
|
||||
$table->afterPrint(function () {
|
||||
return "<div>After Print</div>";
|
||||
});
|
||||
$table->create();
|
||||
$table->render();
|
Reference in New Issue
Block a user