function CounterTest::renderCounter
Same name in other branches
- 8.9.x core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php \Drupal\Tests\views\Unit\Plugin\field\CounterTest::renderCounter()
- 10 core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php \Drupal\Tests\views\Unit\Plugin\field\CounterTest::renderCounter()
- 11.x core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php \Drupal\Tests\views\Unit\Plugin\field\CounterTest::renderCounter()
Renders the counter field handler.
Parameters
\Drupal\views\Plugin\views\field\Counter $handler: The counter handler.
\Drupal\views\ResultRow $row: A result row.
Return value
string The counter rendered markup.
4 calls to CounterTest::renderCounter()
- CounterTest::testCounterRandomPagerOffset in core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ CounterTest.php - Tests a counter field with a random pager offset.
- CounterTest::testCounterRandomStart in core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ CounterTest.php - Tests a counter with a random start.
- CounterTest::testCounterSecondPage in core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ CounterTest.php - Tests a counter field on the second page.
- CounterTest::testSimpleCounter in core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ CounterTest.php - Tests a simple counter field.
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ CounterTest.php, line 227
Class
- CounterTest
- @coversDefaultClass \Drupal\views\Plugin\views\field\Counter @group views
Namespace
Drupal\Tests\views\Unit\Plugin\fieldCode
protected function renderCounter(Counter $handler, ResultRow $row) {
$markup = $handler->render($row);
$handler->postRender($row, $markup);
return $handler->last_render;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.