silverstripe-comments/extensions/CommentingControllerTwitterUsernameExtension.php

11 lines
283 B
PHP

<?php
class CommentingControllerTwitterUsernameExtension extends DataExtension {
public function alterCommentForm(&$form) {
$fields = $form->Fields();
// FIXME order
$fields->insertBefore($tf = new TextField('TwitterUsername','Twitter Username'), 'Comment');
}
}