comparison core/lib/Drupal/Core/Updater/Module.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
47 * {@inheritdoc} 47 * {@inheritdoc}
48 */ 48 */
49 public function isInstalled() { 49 public function isInstalled() {
50 // Check if the module exists in the file system, regardless of whether it 50 // Check if the module exists in the file system, regardless of whether it
51 // is enabled or not. 51 // is enabled or not.
52 $modules = \Drupal::state()->get('system.module.files', []); 52 /** @var \Drupal\Core\Extension\ExtensionList $module_extension_list */
53 return isset($modules[$this->name]); 53 $module_extension_list = \Drupal::service('extension.list.module');
54 return $module_extension_list->exists($this->name);
54 } 55 }
55 56
56 /** 57 /**
57 * {@inheritdoc} 58 * {@inheritdoc}
58 */ 59 */
102 103
103 /** 104 /**
104 * {@inheritdoc} 105 * {@inheritdoc}
105 */ 106 */
106 public function postInstallTasks() { 107 public function postInstallTasks() {
107 // Since this is being called outsite of the primary front controller, 108 // Since this is being called outside of the primary front controller,
108 // the base_url needs to be set explicitly to ensure that links are 109 // the base_url needs to be set explicitly to ensure that links are
109 // relative to the site root. 110 // relative to the site root.
110 // @todo Simplify with https://www.drupal.org/node/2548095 111 // @todo Simplify with https://www.drupal.org/node/2548095
111 $default_options = [ 112 $default_options = [
112 '#type' => 'link', 113 '#type' => 'link',