Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
buildPathsCompletion example
if
(
$input
->
mustSuggestArgumentValuesFor
(
'name'
)
)
{
$suggestions
->
suggestValues
(
$this
->
getAvailableExtensions
(
)
)
;
$suggestions
->
suggestValues
(
$this
->
getAvailableBundles
(
)
)
;
return
;
}
if
(
$input
->
mustSuggestArgumentValuesFor
(
'path'
)
&& null !==
$name
=
$input
->
getArgument
(
'name'
)
)
{
try
{
$config
=
$this
->
getConfig
(
$this
->
findExtension
(
$name
)
,
$this
->
compileContainer
(
)
)
;
$paths
=
array_keys
(
self::
buildPathsCompletion
(
$config
)
)
;
$suggestions
->
suggestValues
(
$paths
)
;
}
catch
(
LogicException
)
{
}
}
if
(
$input
->
mustSuggestOptionValuesFor
(
'format'
)
)
{
$suggestions
->
suggestValues
(
$this
->
getAvailableFormatOptions
(
)
)
;
}
}
private
function
getAvailableExtensions
(
)
: array
{