* refactor

* Add event AFTER_DISPLAY_PAGE
This commit is contained in:
Eric Espie
2021-12-31 11:06:03 +01:00
parent fba78e7d9b
commit 374b71c017
21 changed files with 144 additions and 94 deletions

View File

@@ -17,6 +17,8 @@ use Combodo\iTop\Application\UI\Base\Layout\iUIContentBlock;
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
use Combodo\iTop\Renderer\BlockRenderer;
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
use Combodo\iTop\Service\EventName;
use Combodo\iTop\Service\EventService;
/**
@@ -1344,9 +1346,17 @@ JS;
if (class_exists('DBSearch')) {
DBSearch::RecordQueryTrace();
}
$this->FireAfterDisplayEvent();
ExecutionKPI::ReportStats();
}
protected function FireAfterDisplayEvent()
{
$aData['debug_info'] = 'from: '.get_class($this).":[$this->s_title]";
$aData['object'] = $this;
EventService::FireEvent(EventName::AFTER_DISPLAY_PAGE, get_class($this), $aData);
}
/**
* Build a series of hidden field[s] from an array
*