protected function ConfigFormTest::getFileList in Flysystem 3.x
Same name and namespace in other branches
- 8 tests/src/Unit/Form/ConfigFormTest.php \Drupal\Tests\flysystem\Unit\Form\ConfigFormTest::getFileList()
- 2.0.x tests/src/Unit/Form/ConfigFormTest.php \Drupal\Tests\flysystem\Unit\Form\ConfigFormTest::getFileList()
- 3.0.x tests/src/Unit/Form/ConfigFormTest.php \Drupal\Tests\flysystem\Unit\Form\ConfigFormTest::getFileList()
Converts a file list fron Flysystem into a list of files.
Parameters
array $list: The file list from Flysystem::listContents().
Return value
string[] A list of file paths.
File
- tests/
src/ Unit/ Form/ ConfigFormTest.php, line 250
Class
- ConfigFormTest
- @coversDefaultClass \Drupal\flysystem\Form\ConfigForm @group flysystem
Namespace
Drupal\Tests\flysystem\Unit\FormCode
protected function getFileList(array $list) {
$list = array_filter($list, function (array $file) {
return $file['type'] === 'file';
});
return array_map(function (array $file) {
return $file['path'];
}, $list);
}