You are here

trait ConfigSyncExtensionsTrait in Configuration Synchronizer 8.2

Hierarchy

1 file declares its use of ConfigSyncExtensionsTrait
SyncConfigCollector.php in src/Plugin/SyncConfigCollector.php

File

src/ConfigSyncExtensionsTrait.php, line 5

Namespace

Drupal\config_sync
View source
trait ConfigSyncExtensionsTrait {

  /* Returns the names of currently installed modules and themes.
   *
   * @return array[]
   *   Associative array in which keys are extension types (module or theme)
   *   and values are arrays of extension names.
   */
  protected function getSyncExtensions() {
    $types = [
      'module' => array_keys(\Drupal::service('module_handler')
        ->getModuleList()),
      'theme' => array_keys(\Drupal::service('theme_handler')
        ->listInfo()),
    ];
    return $types;
  }

}

Members