function CommentHelperCase::setCommentPreview
Set comment preview setting.
Parameters
int $mode: Preview value.
11 calls to CommentHelperCase::setCommentPreview()
- CommentContentRebuild::testCommentRebuild in modules/
comment/ comment.test - Test to ensure that the comment's content array is rebuilt for every call to comment_view().
- CommentInterfaceTest::testCommentInterface in modules/
comment/ comment.test - Test comment interface.
- CommentInterfaceTest::testCommentNodeCommentStatistics in modules/
comment/ comment.test - Tests the node comment statistics.
- CommentNodeAccessTest::testThreadedCommentView in modules/
comment/ comment.test - Test that threaded comments can be viewed.
- CommentPagerTest::testCommentNewPageIndicator in modules/
comment/ comment.test - Test comment_new_page_count().
File
-
modules/
comment/ comment.test, line 152
Class
- CommentHelperCase
- @file Tests for comment.module.
Code
function setCommentPreview($mode) {
switch ($mode) {
case DRUPAL_DISABLED:
$mode_text = 'disabled';
break;
case DRUPAL_OPTIONAL:
$mode_text = 'optional';
break;
case DRUPAL_REQUIRED:
$mode_text = 'required';
break;
}
$this->setCommentSettings('comment_preview', $mode, format_string('Comment preview @mode_text.', array(
'@mode_text' => $mode_text,
)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.