File tree Expand file tree Collapse file tree 3 files changed +47
-7
lines changed Expand file tree Collapse file tree 3 files changed +47
-7
lines changed Original file line number Diff line number Diff line change 57
57
"prefer-stable" : true ,
58
58
"autoload" : {
59
59
"files" : [
60
- " src/constants.php" ,
61
60
" src/functions.php"
62
61
],
63
62
"psr-4" : {"Drupal\\ Console\\ Core\\ " : " src" }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * @file
5
+ * Contains Drupal\Console\Core\Utils\DrupalFinder.
6
+ */
7
+
8
+ namespace Drupal \Console \Core \Utils ;
9
+
10
+ use DrupalFinder \DrupalFinder as DrupalFinderBase ;
11
+
12
+ /**
13
+ * Class DrupalFinder
14
+ *
15
+ * @package Drupal\Console\Core\Utils
16
+ */
17
+ class DrupalFinder extends DrupalFinderBase
18
+ {
19
+ public function locateRoot ($ start_path )
20
+ {
21
+ if (parent ::locateRoot ($ start_path )) {
22
+ $ composerRoot = $ this ->getComposerRoot ();
23
+ $ vendorDir = str_replace (
24
+ $ composerRoot .'/ ' , '' , $ this ->getVendorDir ()
25
+ );
26
+ if (!defined ("DRUPAL_CONSOLE_CORE " )) {
27
+ define (
28
+ "DRUPAL_CONSOLE_CORE " ,
29
+ "/ {$ vendorDir }/drupal/console-core/ "
30
+ );
31
+ }
32
+ if (!defined ("DRUPAL_CONSOLE " )) {
33
+ define ("DRUPAL_CONSOLE " , "/ {$ vendorDir }/drupal/console/ " );
34
+ }
35
+ if (!defined ("DRUPAL_CONSOLE_LANGUAGE " )) {
36
+ define (
37
+ "DRUPAL_CONSOLE_LANGUAGE " ,
38
+ "/ {$ vendorDir }/drupal/console-%s/translations/ "
39
+ );
40
+ }
41
+
42
+ return true ;
43
+ }
44
+
45
+ return false ;
46
+ }
47
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments