Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
addConfigDir example
/** * @param string $dir * * @return Shopware_Components_Snippet_Manager */
public
function
addConfigDir
(
$dir
)
{
if
(
!
$this
->fileAdapter
)
{
return
$this
;
}
$this
->fileAdapter->
addConfigDir
(
$dir
)
;
return
$this
;
}
/** * @return Locale */
protected
function
getDefaultLocale
(
)
{
return
$this
->modelManager->
getRepository
(
Shop::
class
)
->
getDefault
(
)
->
getLocale
(
)
;
}
// register plugin views directory
if
(
file_exists
(
$this
->
Path
(
)
. 'Views'
)
)
{
Shopware
(
)
->
Template
(
)
->
addTemplateDir
(
$this
->
Path
(
)
. 'Views/'
)
;
}
// register plugin snippet directory
if
(
file_exists
(
$this
->
Path
(
)
. 'Snippets'
)
)
{
Shopware
(
)
->
Snippets
(
)
->
addConfigDir
(
$this
->
Path
(
)
. 'Snippets/'
)
;
}
// register plugin component directory
if
(
file_exists
(
$this
->
Path
(
)
. 'Components'
)
)
{
Shopware
(
)
->
Loader
(
)
->
registerNamespace
(
'Shopware_Components',
$this
->
Path
(
)
. 'Components/'
)
;
}