protected function BlockFilterTest::filterVisibleElements in Drupal 10
Same name in this branch
- 10 core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php \Drupal\Tests\block\FunctionalJavascript\BlockFilterTest::filterVisibleElements()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\BlockFilterTest::filterVisibleElements()
Same name and namespace in other branches
- 8 core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php \Drupal\Tests\block\FunctionalJavascript\BlockFilterTest::filterVisibleElements()
- 9 core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php \Drupal\Tests\block\FunctionalJavascript\BlockFilterTest::filterVisibleElements()
Removes any non-visible elements from the passed array.
Parameters
\Behat\Mink\Element\NodeElement[] $elements: An array of node elements.
Return value
\Behat\Mink\Element\NodeElement[]
File
- core/
modules/ block/ tests/ src/ FunctionalJavascript/ BlockFilterTest.php, line 91
Class
- BlockFilterTest
- Tests the JavaScript functionality of the block add filter.
Namespace
Drupal\Tests\block\FunctionalJavascriptCode
protected function filterVisibleElements(array $elements) {
$elements = array_filter($elements, function (NodeElement $element) {
return $element
->isVisible();
});
return $elements;
}