Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ForkCMSInstaller.php

function ForkCMSInstaller::inflectThemeVars

Parameters

array<string, string> $vars:

Return value

array<string, string>

1 call to ForkCMSInstaller::inflectThemeVars()
ForkCMSInstaller::inflectPackageVars in vendor/composer/installers/src/Composer/Installers/ForkCMSInstaller.php
Format package name.

File

vendor/composer/installers/src/Composer/Installers/ForkCMSInstaller.php, line 50

Class

ForkCMSInstaller

Namespace

Composer\Installers

Code

protected function inflectThemeVars(array $vars) : array {
    $vars['name'] = $this->pregReplace('/^fork-cms-|-theme|ForkCMS|ForkCms|Forkcms|forkcms|Theme$/', '', $vars['name']);
    $vars['name'] = str_replace(array(
        '-',
        '_',
    ), ' ', $vars['name']);
    // replace hyphens with spaces
    $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
    // make theme name camelcased
    return $vars;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal