Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getFqcnTypeClass example
if
(
$input
->
getOption
(
'show-deprecated'
)
)
{
$options
[
'core_types'
]
=
$this
->
filterTypesByDeprecated
(
$options
[
'core_types'
]
)
;
$options
[
'service_types'
]
=
$this
->
filterTypesByDeprecated
(
$options
[
'service_types'
]
)
;
}
$options
[
'extensions'
]
=
$this
->extensions;
$options
[
'guessers'
]
=
$this
->guessers;
foreach
(
$options
as
$k
=>
$list
)
{
sort
(
$options
[
$k
]
)
;
}
}
else
{
if
(
!
class_exists
(
$class
)
|| !
is_subclass_of
(
$class
, FormTypeInterface::
class
)
)
{
$class
=
$this
->
getFqcnTypeClass
(
$input
,
$io
,
$class
)
;
}
$resolvedType
=
$this
->formRegistry->
getType
(
$class
)
;
if
(
$option
=
$input
->
getArgument
(
'option'
)
)
{
$object
=
$resolvedType
->
getOptionsResolver
(
)
;
if
(
!
$object
->
isDefined
(
$option
)
)
{
$message
=
sprintf
(
'Option "%s" is not defined in "%s".',
$option
,
$resolvedType
->
getInnerType
(
)
::
class
)
;
if
(
$alternatives
=
$this
->
findAlternatives
(
$option
,
$object
->
getDefinedOptions
(
)
)
)
{
if
(
1 === \
count
(
$alternatives
)
)
{