Form/Type/Step/MediaImportSelectionType.php
public function buildKeysChoices(MediaImport $import)
    {
        $prefix = $import->getFilesystem();
        $fs = $this->mountManager->getFilesystem($prefix);
        $contents = $fs->listContents('', true);
        $choices = [];
        foreach ($contents as $object) {
            if (!($object['type'] == 'dir' || substr($object['path'], 0, 1) == '.')) {
                $key = sprintf('%s://%s', $prefix, $object['path']);
                $choices[$key] = $object['path'];
            }
        }
        return $choices;
    }
public function buildKeysChoices(MediaImport $import)
    {
        $prefix = $import->getFilesystem();
        $fs = $this->mountManager->getFilesystem($prefix);
        $contents = $fs->listContents('', true);
        $choices = [];
        foreach ($contents as $object) {
            if (!($object['type'] == 'dir' || substr($object['path'], 0, 1) == '.')) {
                $key = sprintf('%s://%s', $prefix, $object['path']);
                $choices[$key] = $object['path'];
            }
        }
        return $choices;
    }
public function buildKeysChoices ( MediaImport $ import ) { $ prefix = $ import -> getFilesystem ( ) ; $ fs = $ this -> mountManager -> getFilesystem ( $ prefix ) ; $ contents = $ fs -> listContents ( '' , true ) ; $ choices = [ ] ; foreach ( $ contents as $ object ) { if ( ! ( $ object [ 'type' ] == 'dir' || substr ( $ object [ 'path' ] , 0 , 1 ) == '.' ) ) { $ key = sprintf ( '%s://%s' , $ prefix , $ object [ 'path' ] ) ; $ choices [ $ key ] = $ object [ 'path' ] ; } } return $ choices ; }
Builds the keys choices.

@param MediaImport $import
@return array
Builds the keys choices .