diff --git a/install-dev/data/xml/hook.xml b/install-dev/data/xml/hook.xml index 7301372df2545..8134f5c6a19b1 100644 --- a/install-dev/data/xml/hook.xml +++ b/install-dev/data/xml/hook.xml @@ -4539,5 +4539,10 @@ Triggers after loading routes Allow modules to modify routes in any way or add their own multilanguage routes. + + actionPresentObject + Object Presenter + This hook is called before a object is presented + diff --git a/src/Adapter/Presenter/Object/ObjectPresenter.php b/src/Adapter/Presenter/Object/ObjectPresenter.php index a17536b177b5f..eafd7a2276ebd 100644 --- a/src/Adapter/Presenter/Object/ObjectPresenter.php +++ b/src/Adapter/Presenter/Object/ObjectPresenter.php @@ -55,6 +55,8 @@ public function present($object) $presentedObject['id'] = $object->id; + Hook::exec('actionPresentObject', ['presentedObject' => &$presentedObject, 'table' => $object::$definition['table']]); + $this->filterHtmlContent($object::$definition['table'], $presentedObject, $object->getHtmlFields()); return $presentedObject;