protected function addModuleTemplateToParserEnvironment($parser, $module, $templateType, $templateSubdirName)
    {
        // Get template path
        $templateDirectory = $module->getAbsoluteTemplateDirectoryPath($templateSubdirName);
        try {
            $templateDirBrowser = new \DirectoryIterator($templateDirectory);

            $code = ucfirst($module->getCode());

            /* browse the directory */
            foreach ($templateDirBrowser as $templateDirContent) {
                /* is it a directory which is not . or .. ? */
                if ($templateDirContent->isDir() && ! $templateDirContent->isDot()) {
                    $parser->addMethodCall(
                        'addTemplateDirectory',
                        array(
                            $templateType,
                            $templateDirContent->getFilename(),
                            $templateDirContent->getPathName(),
                            $code
                        )
                    );
                }
            }
        } catch (\UnexpectedValueException $ex) {
            // The directory does not exists, ignore it.
        }
    }
protected function addModuleTemplateToParserEnvironment($parser, $module, $templateType, $templateSubdirName)
    {
        // Get template path
        $templateDirectory = $module->getAbsoluteTemplateDirectoryPath($templateSubdirName);
        try {
            $templateDirBrowser = new \DirectoryIterator($templateDirectory);

            $code = ucfirst($module->getCode());

            /* browse the directory */
            foreach ($templateDirBrowser as $templateDirContent) {
                /* is it a directory which is not . or .. ? */
                if ($templateDirContent->isDir() && ! $templateDirContent->isDot()) {
                    $parser->addMethodCall(
                        'addTemplateDirectory',
                        array(
                            $templateType,
                            $templateDirContent->getFilename(),
                            $templateDirContent->getPathName(),
                            $code
                        )
                    );
                }
            }
        } catch (\UnexpectedValueException $ex) {
            // The directory does not exists, ignore it.
        }
    }
protected function addModuleTemplateToParserEnvironment ( $ parser , $ module , $ templateType , $ templateSubdirName ) { // Get template path $ templateDirectory = $ module -> getAbsoluteTemplateDirectoryPath ( $ templateSubdirName ) ; try { $ templateDirBrowser = new \ DirectoryIterator ( $ templateDirectory ) ; $ code = ucfirst ( $ module -> getCode ( ) ) ; /* browse the directory */ foreach ( $ templateDirBrowser as $ templateDirContent ) { /* is it a directory which is not . or .. ? */ if ( $ templateDirContent -> isDir ( ) && ! $ templateDirContent -> isDot ( ) ) { $ parser -> addMethodCall ( 'addTemplateDirectory' , array ( $ templateType , $ templateDirContent -> getFilename ( ) , $ templateDirContent -> getPathName ( ) , $ code ) ) ; } } } catch ( \ UnexpectedValueException $ ex ) { // The directory does not exists, ignore it. } }
Add a module template directory to the parser environment

@param Definition $parser             the parser
@param Module     $module             the Module.
@param string     $templateType       the template type (one of the TemplateDefinition type constants)
@param string     $templateSubdirName the template subdirectory name (one of the TemplateDefinition::XXX_SUBDIR constants)
Add a module template directory to the parser environment