Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
findScriptServices example
->
getTagsByName
(
'method'
)
;
foreach
(
$methodDocs
as
$methodDoc
)
{
$this
->injectedServices
[
ltrim
(
(string)
$methodDoc
->
getReturnType
(
)
, '\\'
)
]
=
$methodDoc
->
getMethodName
(
)
;
}
}
public
function
generate
(
)
: array
{
$scriptServices
=
$this
->
findScriptServices
(
)
;
$data
=
$this
->
getServicesData
(
$scriptServices
)
;
$originalLoader
=
$this
->twig->
getLoader
(
)
;
$this
->twig->
setLoader
(
new
ArrayLoader
(
[
'service-reference.md.twig' =>
file_get_contents
(
self::TEMPLATE_FILE
)
,
]
)
)
;
$result
=
[
]
;
try
{