You are here

protected function LingotekSupportedLocalesControllerTest::filterVisibleElements in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  2. 3.0.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  3. 3.1.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  4. 3.2.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  5. 3.3.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  6. 3.4.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  7. 3.5.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  8. 3.6.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  9. 3.7.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()
  10. 3.8.x tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSupportedLocalesControllerTest::filterVisibleElements()

Removes any non-visible elements from the passed array.

Parameters

array $elements:

Return value

array

1 call to LingotekSupportedLocalesControllerTest::filterVisibleElements()
LingotekSupportedLocalesControllerTest::testFilterSupportedLocales in tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php
Tests that the supported locales are rendered.

File

tests/src/FunctionalJavascript/LingotekSupportedLocalesControllerTest.php, line 56

Class

LingotekSupportedLocalesControllerTest
@group lingotek

Namespace

Drupal\Tests\lingotek\FunctionalJavascript

Code

protected function filterVisibleElements($elements) {
  $elements = array_filter($elements, function ($element) {
    return $element
      ->isVisible();
  });
  return $elements;
}