protected function getPossibleAssetSources($directories, $templateName, $source, &$pathList)
    {
        if ($source !== ParserInterface::TEMPLATE_ASSETS_KEY) {
            // We're in a module.

            // First look into the current template in the right scope : frontOffice, backOffice, ...
            // template should be overridden in : {template_path}/modules/{module_code}/{template_name}
            if (isset($directories[$templateName][ParserInterface::TEMPLATE_ASSETS_KEY])) {
                $pathList['module_override'][] = [
                    $templateName,
                    $directories[$templateName][ParserInterface::TEMPLATE_ASSETS_KEY]
                    . DS
                    . self::MODULE_OVERRIDE_DIRECTORY_NAME . DS
                    . $source
                ];
            }

            // then in the implementation for the current template used in the module directory
            if (isset($directories[$templateName][$source])) {
                $pathList['module_directory'][] = [ $templateName, $directories[$templateName][$source] ];
            }

            // then in the default theme in the module itself
            if (isset($directories[self::DEFAULT_TEMPLATE_NAME][$source])) {
                $pathList['default_fallback'][] = [ $templateName, $directories[self::DEFAULT_TEMPLATE_NAME][$source] ];
            }
        } else {
            $pathList['template'][] = [ $templateName, $directories[$templateName][$source] ];
        }
    }
protected function getPossibleAssetSources($directories, $templateName, $source, &$pathList)
    {
        if ($source !== ParserInterface::TEMPLATE_ASSETS_KEY) {
            // We're in a module.

            // First look into the current template in the right scope : frontOffice, backOffice, ...
            // template should be overridden in : {template_path}/modules/{module_code}/{template_name}
            if (isset($directories[$templateName][ParserInterface::TEMPLATE_ASSETS_KEY])) {
                $pathList['module_override'][] = [
                    $templateName,
                    $directories[$templateName][ParserInterface::TEMPLATE_ASSETS_KEY]
                    . DS
                    . self::MODULE_OVERRIDE_DIRECTORY_NAME . DS
                    . $source
                ];
            }

            // then in the implementation for the current template used in the module directory
            if (isset($directories[$templateName][$source])) {
                $pathList['module_directory'][] = [ $templateName, $directories[$templateName][$source] ];
            }

            // then in the default theme in the module itself
            if (isset($directories[self::DEFAULT_TEMPLATE_NAME][$source])) {
                $pathList['default_fallback'][] = [ $templateName, $directories[self::DEFAULT_TEMPLATE_NAME][$source] ];
            }
        } else {
            $pathList['template'][] = [ $templateName, $directories[$templateName][$source] ];
        }
    }
protected function getPossibleAssetSources ( $ directories , $ templateName , $ source , & $ pathList ) { if ( $ source !== ParserInterface :: TEMPLATE_ASSETS_KEY ) { // We're in a module. // First look into the current template in the right scope : frontOffice, backOffice, ... // template should be overridden in : {template_path}/modules/{module_code}/{template_name} if ( isset ( $ directories [ $ templateName ] [ ParserInterface :: TEMPLATE_ASSETS_KEY ] ) ) { $ pathList [ 'module_override' ] [ ] = [ $ templateName , $ directories [ $ templateName ] [ ParserInterface :: TEMPLATE_ASSETS_KEY ] . DS . self :: MODULE_OVERRIDE_DIRECTORY_NAME . DS . $ source ] ; } // then in the implementation for the current template used in the module directory if ( isset ( $ directories [ $ templateName ] [ $ source ] ) ) { $ pathList [ 'module_directory' ] [ ] = [ $ templateName , $ directories [ $ templateName ] [ $ source ] ] ; } // then in the default theme in the module itself if ( isset ( $ directories [ self :: DEFAULT_TEMPLATE_NAME ] [ $ source ] ) ) { $ pathList [ 'default_fallback' ] [ ] = [ $ templateName , $ directories [ self :: DEFAULT_TEMPLATE_NAME ] [ $ source ] ] ; } } else { $ pathList [ 'template' ] [ ] = [ $ templateName , $ directories [ $ templateName ] [ $ source ] ] ; } }
Get all possible directories from which the asset can be found.
It returns an array of directories ordered by priority.

@param  array  $directories all directories source available for the template type
@param  string $templateName the name of the template
@param  string $source the module code or ParserInterface::TEMPLATE_ASSETS_KEY
@param  array $pathList the pathList that will be updated
Get all possible directories from which the asset can be found . It returns an array of directories ordered by priority .