// We can find the unmet module dependencies by finding the module
// machine names keys that are not in $installed_modules keys.
$unmet_module_dependencies =
array_diff_key($module_dependencies,
$installed_modules);
if ($theme_data[$theme]->info
[ExtensionLifecycle::LIFECYCLE_IDENTIFIER
] === ExtensionLifecycle::DEPRECATED
) { @
trigger_error("The theme '
$theme' is deprecated. See " .
$theme_data[$theme]->info
['lifecycle_link'
], E_USER_DEPRECATED
);
} // Prevent themes with unmet module dependencies from being installed.
if (!
empty($unmet_module_dependencies)) { $unmet_module_dependencies_list =
implode(', ',
array_keys($unmet_module_dependencies));
throw new MissingDependencyException("Unable to install theme: '
$theme' due to unmet module dependencies: '
$unmet_module_dependencies_list'."
);
} foreach ($module_dependencies as $dependency =>
$dependency_object) { if ($incompatible =
$this->
checkDependencyMessage($module_list,
$dependency,
$dependency_object)) { $sanitized_message = Html::
decodeEntities(strip_tags($incompatible));
throw new MissingDependencyException("Unable to install theme:
$sanitized_message"
);
} } // Add dependencies to the list of themes to install. The new themes
// will be processed as the parent foreach loop continues.