ComposerInstallersCockpitInstaller

The WooCommerce Multilingual Composer Installers CockpitInstaller class.

Defined (1)

The class is defined in the following location(s).

/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php  
  1. class CockpitInstaller extends BaseInstaller 
  2. protected $locations = array( 
  3. 'module' => 'cockpit/modules/addons/{$name}/',  
  4. ); 
  5.  
  6. /** 
  7. * Format module name. 
  8. * Strip `module-` prefix from package name. 
  9. * @param array @vars 
  10. * @return array 
  11. */ 
  12. public function inflectPackageVars($vars) 
  13. if ($vars['type'] == 'cockpit-module') { 
  14. return $this->inflectModuleVars($vars); 
  15.  
  16. return $vars; 
  17.  
  18. public function inflectModuleVars($vars) 
  19. $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name'])); 
  20.  
  21. return $vars;