Skip to content

Commit

Permalink
Add support for selecting visibilityHandler class (#284)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Kozák <[email protected]>
  • Loading branch information
Kozzi11 and Daniel Kozák authored Aug 8, 2023
1 parent d019ab4 commit f69f917
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ public function create(ContainerBuilder $container, string $id, array $config):
$bucket->setFactory([new Reference($config['client']), 'bucket']);
$bucket->setArgument(0, $config['bucket']);

$visibilityHandler = $config['visibilityHandler'] ? new Definition($config['visibilityHandler']) : null;

$container
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.googlecloudstorage'))
->replaceArgument(0, $bucket)
->replaceArgument(1, $config['prefix'])
->replaceArgument(2, $config['visibilityHandler'])
->replaceArgument(2, $visibilityHandler)
->replaceArgument(3, $config['defaultVisiblity'])
->replaceArgument(4, $config['mimeTypeDetector'])
;
Expand Down

0 comments on commit f69f917

Please sign in to comment.