@@ -3,9 +3,9 @@ The Acquia Drupal Recommended Settings plugin adds the recommended settings to
3
3
the Drupal project, so developers won't have to edit settings.php manually.
4
4
5
5
The recommended settings includes:
6
- - the required database credentials.
7
- - configuration sync directory path.
8
- - public/private etc. file directory path .
6
+ - The required database credentials.
7
+ - Configuration sync directory path.
8
+ - File directory path i.e public/private etc.
9
9
- Acquia site studio sync directory path.
10
10
11
11
It allows your websites to be easily installed in both Acquia Cloud IDE & local
@@ -52,6 +52,43 @@ composer require acquia/drupal-recommended-settings
52
52
+ use Acquia\Drupal\RecommendedSettings\Helpers\EnvironmentDetector;
53
53
```
54
54
55
+ ## Steps to use Acquia Drupal Recommended Settings with BLT.
56
+ - Create an Settings object & call generate method.
57
+ ```
58
+ <?php
59
+
60
+ /**
61
+ * @file
62
+ * Include DRS settings.
63
+ */
64
+
65
+ use Acquia\Drupal\RecommendedSettings\Settings;
66
+
67
+ // Create settings object.
68
+ $settings = new Settings(DRUPAL_ROOT, 'site-uri');
69
+
70
+ // Database details.
71
+ $dbSpec = [
72
+ 'drupal' => [
73
+ 'db' => [
74
+ // Database name.
75
+ 'database' => 'drupal',
76
+ // Mysql database login username.
77
+ 'username' => 'drupal',
78
+ // Mysql database login password.
79
+ 'password' => 'drupal',
80
+ // Mysql host.
81
+ 'host' => 'localhost',
82
+ // Mysql port.
83
+ 'port' => '3306',
84
+ ],
85
+ ],
86
+ ];
87
+
88
+ // Call generate method with database details.
89
+ $settings->generate($dbSpec);
90
+ ```
91
+
55
92
# License
56
93
57
94
Copyright (C) 2023 Acquia, Inc.
@@ -64,4 +101,3 @@ This program is distributed in the hope that it will be useful,
64
101
but WITHOUT ANY WARRANTY; without even the implied warranty of
65
102
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
66
103
See the GNU General Public License for more details.
67
-
0 commit comments