mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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();
|
||||
}
|
||||
|
||||
$return = $this->renderWith($this->getTemplates());
|
||||
$context = $this;
|
||||
$this->extend('onBeforeRender', $context);
|
||||
|
||||
$return = $context->renderWith($this->getTemplates());
|
||||
|
||||
// Now that we're rendered, clear message
|
||||
$this->clearMessage();
|
||||
$context->clearMessage();
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user