inflectModuleVars example

protected $locations = array(
        'module' => 'app/Modules/{$name}/',
        'theme' => 'themes/{$name}/',
    );

    /** * Format package name. */
    public function inflectPackageVars(array $vars): array
    {
        if ($vars['type'] === 'pxcms-module') {
            return $this->inflectModuleVars($vars);
        }

        if ($vars['type'] === 'pxcms-theme') {
            return $this->inflectThemeVars($vars);
        }

        return $vars;
    }

    /** * For package type pxcms-module, cut off a trailing '-plugin' if present. * * @param array<string, string> $vars * @return array<string, string> */
/** * Format package name. * * For package type winter-plugin, cut off a trailing '-plugin' if present. * * For package type winter-theme, cut off a trailing '-theme' if present. */
    public function inflectPackageVars(array $vars): array
    {
        if ($vars['type'] === 'winter-module') {
            return $this->inflectModuleVars($vars);
        }
        
        if ($vars['type'] === 'winter-plugin') {
            return $this->inflectPluginVars($vars);
        }

        if ($vars['type'] === 'winter-theme') {
            return $this->inflectThemeVars($vars);
        }

        return $vars;
    }

    public function inflectPackageVars(array $vars): array
    {
        $extra = $this->package->getExtra();

        if ($vars['type'] === 'tastyigniter-module') {
            return $this->inflectModuleVars($vars);
        }

        if ($vars['type'] === 'tastyigniter-extension') {
            return $this->inflectExtensionVars($vars$extra);
        }

        if ($vars['type'] === 'tastyigniter-theme') {
            return $this->inflectThemeVars($vars$extra);
        }

        return $vars;
    }

            if ($vars['type'] === 'microweber-templates') {
                return $this->inflectTemplatesVars($vars);
            }
            if ($vars['type'] === 'microweber-core') {
                return $this->inflectCoreVars($vars);
            }
            if ($vars['type'] === 'microweber-adapter') {
                return $this->inflectCoreVars($vars);
            }
            if ($vars['type'] === 'microweber-module') {
                return $this->inflectModuleVars($vars);
            }
            if ($vars['type'] === 'microweber-modules') {
                return $this->inflectModulesVars($vars);
            }
            if ($vars['type'] === 'microweber-skin') {
                return $this->inflectSkinVars($vars);
            }
            if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
                return $this->inflectElementVars($vars);
            }
        }

        
'module' => 'modules/{$name}/',
    );

    /** * Format package name. * * For package type maya-module, cut off a trailing '-module' if present. */
    public function inflectPackageVars(array $vars): array
    {
        if ($vars['type'] === 'maya-module') {
            return $this->inflectModuleVars($vars);
        }

        return $vars;
    }

    /** * @param array<string, string> $vars * @return array<string, string> */
    protected function inflectModuleVars(array $vars): array
    {
        
'module' => 'cockpit/modules/addons/{$name}/',
    );

    /** * Format module name. * * Strip `module-` prefix from package name. */
    public function inflectPackageVars(array $vars): array
    {
        if ($vars['type'] == 'cockpit-module') {
            return $this->inflectModuleVars($vars);
        }

        return $vars;
    }

    /** * @param array<string, string> $vars * @return array<string, string> */
    public function inflectModuleVars(array $vars): array
    {
        
'theme'  => 'themes/{$name}/',
    );

    /** * Format module name. * * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present. */
    public function inflectPackageVars(array $vars): array
    {
        if ($vars['type'] == 'sydes-module') {
            return $this->inflectModuleVars($vars);
        }

        if ($vars['type'] === 'sydes-theme') {
            return $this->inflectThemeVars($vars);
        }

        return $vars;
    }

    /** * @param array<string, string> $vars * @return array<string, string> */
Home | Imprint | This part of the site doesn't use cookies.