function updatexml_determine_project_type

6.x updatexml_determine_project_type($xml)
5.x updatexml_determine_project_type($xml)

Determine a project type from its update service xml.

2 calls to updatexml_determine_project_type()
release_info_check_project in commands/pm/release_info/
Check if a project is available in a update service.
release_info_fetch in commands/pm/release_info/
Obtain the most appropiate release for the requested project.


commands/pm/release_info/, line 516
Drush release info engine for and compatible services.


function updatexml_determine_project_type($xml) {
  $project_types = array(
    'core' => 'project_core',
    'profile' => 'project_distribution',
    'module' => 'project_module',
    'theme' => 'project_theme',
    'theme engine' => 'project_theme_engine',
    'translation' => 'project_translation',

  $type = (string) $xml->type;
  // Probably unused but kept for possible legacy compat.
  $type = ($type == 'profile-legacy') ? 'profile' : $type;
  $type = array_search($type, $project_types);
  return $type;