-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRoboFile.php
58 lines (50 loc) · 1.34 KB
/
RoboFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* @file
* Contains \Robo\RoboFile.
*
* Implementation of class for Robo - http://robo.li/
*
* You may override methods provided by RoboFileBase.php in this file.
* Configuration overrides should be made in the constructor.
*/
include_once 'RoboFileBase.php';
/**
* Class RoboFile.
*/
class RoboFile extends RoboFileBase {
/**
* {@inheritdoc}
*/
public function build(): void {
parent::build();
$this->say("To provide default content for shepherd, use robo dev:drupal-content-generate or robo dev:wordpress-content-generate");
}
/**
* Create default content for the Shepherd.
*/
public function devDrupalContentGenerate() {
$virtual_host = getenv("VIRTUAL_HOST");
if (!empty($virtual_host)) {
$this->_exec("$this->drush_cmd scr DrupalContentGenerate.php --uri=$virtual_host");
}
}
/**
* Create default WP content for the Shepherd.
*/
public function devWordpressContentGenerate() {
$virtual_host = getenv("VIRTUAL_HOST");
if (!empty($virtual_host)) {
$this->_exec("$this->drush_cmd scr WordpressContentGenerate.php --uri=$virtual_host");
}
}
/**
* Create a dev login link.
*/
public function devLogin() {
$virtual_host = getenv("VIRTUAL_HOST");
if (!empty($virtual_host)) {
$this->_exec("$this->drush_cmd --uri=$virtual_host uli");
}
}
}