NEW: Add onBeforeRender extension hook to Form
This commit is contained in:
parent
e454db6dc9
commit
c925fae180
|
@ -1552,10 +1552,13 @@ class Form extends ViewableData implements HasRequestHandler
|
||||||
HTTPCacheControlMiddleware::singleton()->disableCache();
|
HTTPCacheControlMiddleware::singleton()->disableCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = $this->renderWith($this->getTemplates());
|
$context = $this;
|
||||||
|
$this->extend('onBeforeRender', $context);
|
||||||
|
|
||||||
|
$return = $context->renderWith($this->getTemplates());
|
||||||
|
|
||||||
// Now that we're rendered, clear message
|
// Now that we're rendered, clear message
|
||||||
$this->clearMessage();
|
$context->clearMessage();
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue