@@ -12,25 +12,23 @@ It allows your websites to be easily installed in both Acquia Cloud IDE & local
12
12
and deployable on Acquia Cloud.
13
13
14
14
## Installation
15
+ ### Install using Composer
15
16
16
- ### Include Acquia Global Command in DRS for multisite functionality
17
- To use global command with DRS for multisite functionality please add below in
18
- your root composer.json file.
19
17
```
20
- "repositories": {
21
- "acquia_global_commands": {
22
- "type": "vcs",
23
- "url": "[email protected] :vishalkhode1/acquia_global_commands.git"
24
- }
25
- }
18
+ composer require acquia/drupal-recommended-settings
26
19
```
27
-
28
- You can also install this using Composer like so:
29
-
20
+ ### Multi-site features with Acquia DRS
21
+ The Drupal Recommended Settings offer the multi-site feature out of the box.
22
+ To configure a multi-site, run the following command, and the plugin will
23
+ automatically generate the settings.php in the backend.
30
24
```
31
- composer require acquia/drupal-recommended-settings
25
+ drush site:install --uri site1
32
26
```
33
27
28
+ The plugin offers various events that allow you to implement custom logic based
29
+ on when these events are triggered. You can find the examples of such
30
+ implementations from [ here] ( examples ) .
31
+
34
32
# Quick examples
35
33
## Generate settings for a given site
36
34
```
@@ -51,7 +49,8 @@ $settings = new Settings(DRUPAL_ROOT, $siteUri);
51
49
try {
52
50
// Call generate method.
53
51
$settings->generate();
54
- } catch (SettingsException $e) {
52
+ }
53
+ catch (SettingsException $e) {
55
54
echo $e->getMessage();
56
55
}
57
56
```
@@ -77,7 +76,7 @@ $settings = new Settings(DRUPAL_ROOT, $siteUri);
77
76
$dbSpec = [
78
77
'drupal' => [
79
78
'db' => [
80
- 'database' => 'drupal',
79
+ 'database' => 'drupal', // In case of multi-site database name is replaced with the site name.
81
80
'username' => 'drupal',
82
81
'password' => 'drupal',
83
82
'host' => 'localhost',
@@ -89,7 +88,8 @@ $dbSpec = [
89
88
try {
90
89
// Call generate method passing database details.
91
90
$settings->generate($dbSpec);
92
- } catch (SettingsException $e) {
91
+ }
92
+ catch (SettingsException $e) {
93
93
echo $e->getMessage();
94
94
}
95
95
```
0 commit comments