How can I call the dump () function inside the onFlexObjectAfterSave () function?
public static function getSubscribedEvents() {
return [
'onFlexObjectAfterSave' => ['onFlexObjectAfterSave', 0],
];
}
public function onFlexObjectAfterSave($event)
{
$path= $this->grav['uri']->paths(1);
if($path == "data-table"){
$object = $event['object'];
dump($object);
$this->grav['debugger']->addMessage('-----------------------------------------');
$this->grav['debugger']->addMessage($object);
$this->grav['debugger']->addMessage('-----------------------------------------');
}
}
Is there a way to pause the grav before redirecting after saving? To display the result of the dump function?