mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
FIX reintroduce extension hook for comment form rendering
In CWP 1.x there was an extension hook to allow alterations to the commenting form. Since the upgrade of this module for CWP 2.x this was no longer there, meaning functionality that relied upon it no longer worked. This commit reintroduces this functionality to keep other modules that apply extensions to that hook, happy.
This commit is contained in:
parent
4385299f1f
commit
a886f68c58
@ -475,7 +475,12 @@ class CommentingController extends Controller
|
||||
*/
|
||||
public function CommentsForm()
|
||||
{
|
||||
return Injector::inst()->create(CommentForm::class, __FUNCTION__, $this);
|
||||
$form = Injector::inst()->create(CommentForm::class, __FUNCTION__, $this);
|
||||
|
||||
// hook to allow further extensions to alter the comments form
|
||||
$this->extend('alterCommentForm', $form);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user