Merge pull request #245 from creative-commoners/pulls/2.0/reallow-commentform-alterations

FIX reintroduce extension hook for comment form rendering
This commit is contained in:
Robbie Averill 2018-04-04 16:36:51 +12:00 committed by GitHub
commit eb0415a938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -475,7 +475,12 @@ class CommentingController extends Controller
*/ */
public function CommentsForm() 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;
} }