-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Site Hosting | ||
|
||
Create and manage websites. | ||
|
||
## History | ||
|
||
This was created by DevShop author Jon Pugh. It replaces the "Hosting" module used in Aegir & DevShop in Drupal 7. | ||
|
||
## Requirements | ||
|
||
- [Site Module](https://drupal.org/project/site) | ||
- [Commands Module](https://drupal.org/project/commands) | ||
|
||
## Installation | ||
|
||
```shell | ||
composer require drupal/site_hosting | ||
``` | ||
|
||
## Configuration | ||
|
||
TODO | ||
|
||
## Maintainers | ||
|
||
Current maintainers for Site Hosting: | ||
|
||
- Jon Pugh (@jonpugh) - https://www.drupal.org/u/jonpugh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: 'Site Hosting' | ||
type: module | ||
description: 'Create and manage websites.' | ||
package: Operations | ||
core_version_requirement: ^10 || ^11 | ||
dependencies: | ||
- commands:commands | ||
- site:site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Install, update and uninstall functions for the Site Hosting module. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Primary module hooks for Site Hosting module. | ||
*/ |
42 changes: 42 additions & 0 deletions
42
src/Drupal/Modules/site_hosting/src/Plugins/Command/ComposerInstall.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Drupal\commands\Plugin\Command; | ||
|
||
use Drupal\commands\CommandPluginBase; | ||
use Drupal\Core\Form\FormStateInterface; | ||
use Drupal\user\Entity\User; | ||
|
||
/** | ||
* Plugin implementation of the task_command. | ||
* | ||
* @Command( | ||
* id = "composer_install", | ||
* label = @Translation("Composer Install"), | ||
* description = @Translation("Runs composer install."), | ||
* command = "composer install --ansi" | ||
* ) | ||
*/ | ||
class ComposerInstall extends CommandPluginBase { | ||
|
||
public function command($params = []) { | ||
if (!empty($params['verbose'])) { | ||
return parent::command($params) . ' --verbose'; | ||
} | ||
return parent::command($params); | ||
} | ||
|
||
/** | ||
* Show a form on the "Run command" form. | ||
* @return void | ||
*/ | ||
public function form($form, FormStateInterface $form_state) { | ||
$form['parameters']['verbose'] = [ | ||
'#type' => 'checkbox', | ||
'#title' => t('Verbose'), | ||
'#description'=> t('Get verbose information.'), | ||
]; | ||
|
||
// @TODO: Reset working_directory to detected composer root. | ||
return $form; | ||
} | ||
} |
Empty file.