You are here

function _module_builder_drupal_major_version in Module Builder 7

Same name and namespace in other branches
  1. 6.2 includes/common.inc \_module_builder_drupal_major_version()

Returns the Drupal major version number (5, 6, 7 ...)

Helper function for module_builder_include. Cribbed and hacked from drush.

4 calls to _module_builder_drupal_major_version()
module_builder_create_directory in includes/common_version_7.inc
Run through Drupal's directory creation and checking stuff, adding a version subfolder for common directories.
module_builder_create_directory in includes/common_version.inc
Run through Drupal's directory creation and checking stuff, adding a version subfolder for common directories.
module_builder_include in includes/common.inc
Include a version-specific file whether we're on drush or drupal. That is, we first try to include a file called NAME_X.inc where X is a Drupal major version number before falling back to NAME.inc.
module_builder_module_builder_info in ./module_builder.module_builder.inc
Implementation of hook_module_builder_info().

File

includes/common.inc, line 85
common.inc Stuff needed both by module and drush command.

Code

function _module_builder_drupal_major_version() {
  list($major_version) = explode('.', VERSION);
  return $major_version;
}