function CommentTestBase::setCommentsPerPage
Same name in this branch
- 8.9.x core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::setCommentsPerPage()
Same name in other branches
- 9 core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::setCommentsPerPage()
- 10 core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::setCommentsPerPage()
- 11.x core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::setCommentsPerPage()
Sets the value specifying the default number of comments per page.
Parameters
int $number: Comments per page value.
string $field_name: (optional) Field name through which the comment should be posted. Defaults to 'comment'.
File
-
core/
modules/ comment/ src/ Tests/ CommentTestBase.php, line 322
Class
- CommentTestBase
- Provides setup and helper methods for comment tests.
Namespace
Drupal\comment\TestsCode
public function setCommentsPerPage($number, $field_name = 'comment') {
$this->setCommentSettings('per_page', $number, new FormattableMarkup('Number of comments per page set to @number.', [
'@number' => $number,
]), $field_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.