Version 1
[yaffs-website] / web / core / modules / config / tests / config_test / src / TestInstallStorage.php
1 <?php
2
3 namespace Drupal\config_test;
4
5 use Drupal\Core\Config\InstallStorage;
6 use Drupal\Core\Extension\ExtensionDiscovery;
7
8 /**
9  * Tests configuration of profiles, modules and themes.
10  *
11  * A test configuration storage to read configuration from all profiles, modules
12  * and themes regardless of installation status or installed profile.
13  */
14 class TestInstallStorage extends InstallStorage {
15
16   /**
17    * {@inheritdoc}
18    */
19   protected function getAllFolders() {
20     if (!isset($this->folders)) {
21       $this->folders = $this->getCoreNames();
22       $listing = new ExtensionDiscovery(\Drupal::root());
23       $listing->setProfileDirectories([]);
24       $this->folders += $this->getComponentNames($listing->scan('profile'));
25       $this->folders += $this->getComponentNames($listing->scan('module'));
26       $this->folders += $this->getComponentNames($listing->scan('theme'));
27     }
28     return $this->folders;
29   }
30
31 }