public ListInterface::filter($callback)
Filters the items in the list using a custom callback.
callable $callback: The callback to use for filtering. Like with array_filter(), the callback is called for each item in the list. Only items for which the callback returns TRUE are preserved.
$this
public function filter($callback);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!ListInterface.php/function/ListInterface::filter/8.1.x