5 * Install, uninstall and update hooks for Media Entity Actions module.
9 * Implements hook_requirements().
11 function media_entity_actions_requirements($phase) {
14 // Prevent installation if Media Entity 1.x is enabled.
15 if (\Drupal::moduleHandler()->moduleExists('media_entity')) {
16 $info = system_get_info('module', 'media_entity');
17 if (version_compare($info['version'], '8.x-2') < 0) {
18 $requirements['media_entity_generic_incompatibility'] = [
19 'title' => t('Media'),
20 'description' => t('The Media Entity Actions module is not compatible with contrib <a href=":url">Media Entity</a> 1.x branch. You don\'t need to enable this module manually, when performing the upgrade to Media in core, this module will be automatically enabled.', [
21 ':url' => 'https://drupal.org/project/media_entity',
23 'severity' => REQUIREMENT_ERROR,