Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
completeOptions example
public
function
complete
(
CompletionInput
$input
, CompletionSuggestions
$suggestions
)
: void
{
if
(
$input
->
mustSuggestArgumentValuesFor
(
'class'
)
)
{
$suggestions
->
suggestValues
(
array_merge
(
$this
->
getCoreTypes
(
)
,
$this
->types
)
)
;
return
;
}
if
(
$input
->
mustSuggestArgumentValuesFor
(
'option'
)
&& null !==
$class
=
$input
->
getArgument
(
'class'
)
)
{
$this
->
completeOptions
(
$class
,
$suggestions
)
;
return
;
}
if
(
$input
->
mustSuggestOptionValuesFor
(
'format'
)
)
{
$suggestions
->
suggestValues
(
$this
->
getAvailableFormatOptions
(
)
)
;
}
}
private
function
completeOptions
(
string
$class
, CompletionSuggestions
$suggestions
)
: void
{