You are here

function module_builder_get_class in Module Builder 6.2

Helper function to get the desired class.

Parameters

$type: One of (so far) 'info' or 'code'.

Return value

A class name for the type and, if it exists, version, eg 'ModuleBuilderGeneratorInfo6'.

2 calls to module_builder_get_class()
module_builder_generate_info_oo in includes/generate.inc
Generate info code. New OO version!
module_builder_generate_module in includes/generate.inc
Generate module code.

File

includes/generate.inc, line 30
Module builder code generating code.

Code

function module_builder_get_class($type) {
  $type = ucfirst($type);
  $version = _module_builder_drupal_major_version();
  $class = 'ModuleBuilderGenerator' . $type . $version;
  if (!class_exists($class)) {
    $class = 'ModuleBuilderGenerator' . $type;
  }
  return $class;
}