Sets the value governing restrictions on anonymous comments.
Parameters
integer $level:
The level of the contact information allowed for anonymous comments:
- 0: No contact information allowed.
- 1: Contact information allowed but not required.
- 2: Contact information required.
File
- drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php, line 245
- Contains Drupal\comment\Tests\CommentTestBase.
Class
- CommentTestBase
- Provides setup and helper methods for comment tests.
Namespace
Drupal\comment\Tests
Code
function setCommentAnonymous($level) {
$this
->setCommentSettings('comment_anonymous', $level, format_string('Anonymous commenting set to level @level.', array(
'@level' => $level,
)));
}