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:
Raissa North 2018-04-04 15:45:45 +12:00
parent 4385299f1f
commit a886f68c58

View File

@ -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;
}