src/Generator/Analyzer/Steps/ResolveModuleNames.php
protected function addOrInjectSectionNamePrefix($moduleId)
    {
        $module = $this->data->rawData['modules'][ $moduleId ];
        $prefix = $module['parent_names']['section'];

        // mark so we don't prefix it twice
        $this->modulePrefixedSection[$moduleId] = true;

        // simple prefix if nothing else was prefixed yet
        if ( ! $this->prefixGroup && ! $this->prefixMenu) {
            $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
                $this->addPrefix(
                    array_get($module, 'prefixed_name') ?: $module['name'],
                    $prefix
                );
        }

        // simple prefix won't work, we'll need to rebuild the name, prefixing the section first
        $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
            $this->addPrefix(
                array_get($module, 'prefixed_name') ?: $module['name'],
                $module['parent_names']['section']
            );

        if ($this->prefixGroup) {
            $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
                $this->addPrefix(
                    array_get($module, 'prefixed_name') ?: $module['name'],
                    $module['parent_names']['group']
                );
        }

        if ($this->prefixMenu) {
            $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
                $this->addPrefix(
                    array_get($module, 'prefixed_name') ?: $module['name'],
                    $module['parent_names']['menu']
                );
        }
    }
protected function addOrInjectSectionNamePrefix($moduleId)
    {
        $module = $this->data->rawData['modules'][ $moduleId ];
        $prefix = $module['parent_names']['section'];

        // mark so we don't prefix it twice
        $this->modulePrefixedSection[$moduleId] = true;

        // simple prefix if nothing else was prefixed yet
        if ( ! $this->prefixGroup && ! $this->prefixMenu) {
            $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
                $this->addPrefix(
                    array_get($module, 'prefixed_name') ?: $module['name'],
                    $prefix
                );
        }

        // simple prefix won't work, we'll need to rebuild the name, prefixing the section first
        $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
            $this->addPrefix(
                array_get($module, 'prefixed_name') ?: $module['name'],
                $module['parent_names']['section']
            );

        if ($this->prefixGroup) {
            $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
                $this->addPrefix(
                    array_get($module, 'prefixed_name') ?: $module['name'],
                    $module['parent_names']['group']
                );
        }

        if ($this->prefixMenu) {
            $this->data->rawData['modules'][ $moduleId ]['prefixed_name'] =
                $this->addPrefix(
                    array_get($module, 'prefixed_name') ?: $module['name'],
                    $module['parent_names']['menu']
                );
        }
    }
protected function addOrInjectSectionNamePrefix ( $ moduleId ) { $ module = $ this -> data -> rawData [ 'modules' ] [ $ moduleId ] ; $ prefix = $ module [ 'parent_names' ] [ 'section' ] ; // mark so we don't prefix it twice $ this -> modulePrefixedSection [ $ moduleId ] = true ; // simple prefix if nothing else was prefixed yet if ( ! $ this -> prefixGroup && ! $ this -> prefixMenu ) { $ this -> data -> rawData [ 'modules' ] [ $ moduleId ] [ 'prefixed_name' ] = $ this -> addPrefix ( array_get ( $ module , 'prefixed_name' ) ? : $ module [ 'name' ] , $ prefix ) ; } // simple prefix won't work, we'll need to rebuild the name, prefixing the section first $ this -> data -> rawData [ 'modules' ] [ $ moduleId ] [ 'prefixed_name' ] = $ this -> addPrefix ( array_get ( $ module , 'prefixed_name' ) ? : $ module [ 'name' ] , $ module [ 'parent_names' ] [ 'section' ] ) ; if ( $ this -> prefixGroup ) { $ this -> data -> rawData [ 'modules' ] [ $ moduleId ] [ 'prefixed_name' ] = $ this -> addPrefix ( array_get ( $ module , 'prefixed_name' ) ? : $ module [ 'name' ] , $ module [ 'parent_names' ] [ 'group' ] ) ; } if ( $ this -> prefixMenu ) { $ this -> data -> rawData [ 'modules' ] [ $ moduleId ] [ 'prefixed_name' ] = $ this -> addPrefix ( array_get ( $ module , 'prefixed_name' ) ? : $ module [ 'name' ] , $ module [ 'parent_names' ] [ 'menu' ] ) ; } }
Prefixes module name with section name, keeping into account whether
other, higher-level prefixes have been applied

@param int $moduleId
Prefixes module name with section name keeping into account whether other higher - level prefixes have been applied