Pass event instead of object to the getHtmlForEvent method of EventDetailsExtensionHook

This commit is contained in:
Damiano Chini 2021-05-11 11:28:00 +02:00 committed by Johannes Meyer
parent 688e3fd6e5
commit 89fdccb858
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class EventController extends Controller
/** @var EventDetailsExtensionHook $hook */
foreach (Hook::all('Monitoring\\EventDetailsExtension') as $hook) {
try {
$html = $hook->getHtmlForEvent($object);
$html = $hook->getHtmlForEvent($event);
} catch (\Exception $e) {
$html = $this->view->escape($e->getMessage());
}

View File

@ -41,7 +41,7 @@ abstract class EventDetailsExtensionHook
/**
* Shall return valid HTML to include in the detail view
*
* @param object $object The object to generate HTML for
* @param object $event The object to generate HTML for
*
* @return string
*/