|
1 | 1 | <?php |
2 | 2 |
|
3 | | -#ddev-generated |
4 | | -# If you want to take over this file and customize it, remove the line above |
5 | | -# and ddev will respect it and won't overwrite the file. |
| 3 | +//ddev-generated |
| 4 | +// If you want to take over this file and customize it, remove the line above |
| 5 | +// and ddev will respect it and won't overwrite the file. |
6 | 6 |
|
7 | 7 | $extensionKey = getenv('EXTENSION_NAME'); |
8 | 8 | $typo3AdminUser = getenv('TYPO3_INSTALL_ADMIN_USER'); |
|
23 | 23 | <html lang="en"> |
24 | 24 | <head> |
25 | 25 | <meta charset="UTF-8"> |
26 | | - <title><?php echo($extensionKey); ?></title> |
| 26 | + <title><?php echo $extensionKey; ?></title> |
27 | 27 | <link |
28 | 28 | rel="stylesheet" |
29 | 29 | href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" |
|
39 | 39 | <header class="container"> |
40 | 40 | <h1> |
41 | 41 | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-0.5 -0.5 24 24" id="Typo3-Icon--Streamline-Svg-Logos.svg" height="40" width="40"><path fill="#F49700" d="M9.895582291666667 0.5915863541666667c-0.4094479166666667 0.35015104166666666 -0.7003020833333333 0.7595869791666667 -0.7003020833333333 1.9823292708333333 0 3.32738125 4.19994375 13.322414583333334 7.060448958333334 13.322414583333334 0.32128125 0.004360416666666667 0.6412927083333333 -0.04125625 0.9485583333333334 -0.13522083333333335l-0.0060375 0.0016770833333333334 -0.07309687499999999 0.11725208333333334C14.656414583333333 19.815003125000004 11.685221875 22.70162291666667 9.887244791666667 22.759530208333334L9.832571875000001 22.760416666666668C5.927195833333333 22.760416666666668 0.38405927083333335 10.970137500000002 0.38405927083333335 5.7827270833333335c0 -0.8170270833333334 0.185265 -1.45805625 0.46686645833333335 -1.8563635416666668C2.194099375 2.2849110416666667 6.394071875000001 0.9991703125 9.895582291666667 0.5915863541666667ZM15.379429166666668 0.23958333333333334c3.616366666666667 0 7.236446875 0.5835842708333334 7.236446875 2.6252104166666665 0 4.142515625000001 -2.627055208333333 9.1632 -3.9683864583333337 9.1632 -2.391760416666667 0 -5.372680208333334 -6.652869791666666 -5.372680208333334 -9.980222291666667C13.274809375 0.5304494791666666 13.856541666666667 0.23958333333333334 15.373870833333335 0.23958333333333334h0.0055583333333333335Z" stroke-width="1"></path></svg> |
42 | | - <?php echo($extensionKey); ?></h1> |
| 42 | + <?php echo $extensionKey; ?></h1> |
43 | 43 | </header> |
44 | 44 | <main class="container"> |
45 | | - <blockquote><?php echo($description); ?></blockquote> |
| 45 | + <blockquote><?php echo $description; ?></blockquote> |
46 | 46 | <hr/> |
47 | 47 | <p>Run <code>ddev install all</code> to install all TYPO3 instances below:</p> |
48 | 48 | <?php |
49 | 49 | foreach ($supportedVersions as $version) { |
50 | | - $directoryPath = "/var/www/html/.Build/" . $version; |
| 50 | + $directoryPath = '/var/www/html/.Build/' . $version; |
51 | 51 | if (is_dir($directoryPath)) { |
52 | 52 | echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/?u={$typo3AdminUser}&p={$typo3AdminPassword}'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>"; |
53 | 53 | } else { |
54 | 54 | echo "<article>Version {$version} is not installed. Run <code>ddev install {$version}</code> to install.</article>"; |
55 | 55 | } |
56 | 56 | } |
57 | | - ?> |
| 57 | +?> |
58 | 58 | <h2>Additional information</h2> |
59 | 59 | <h4>DDEV commands</h4> |
60 | 60 | <?php |
61 | | - // Directories to scan for DDEV commands |
62 | | - $directories = [ |
63 | | - '/var/www/html/.ddev/commands/web', |
64 | | - '/var/www/html/.ddev/commands/host' |
65 | | - ]; |
| 61 | +// Directories to scan for DDEV commands |
| 62 | +$directories = [ |
| 63 | + '/var/www/html/.ddev/commands/web', |
| 64 | + '/var/www/html/.ddev/commands/host', |
| 65 | +]; |
66 | 66 |
|
67 | | - foreach ($directories as $directory) { |
68 | | - foreach (new DirectoryIterator($directory) as $fileInfo) { |
69 | | - $filePath = $fileInfo->getPathname(); |
70 | | - $fileName = $fileInfo->getFilename(); |
| 67 | +foreach ($directories as $directory) { |
| 68 | + foreach (new DirectoryIterator($directory) as $fileInfo) { |
| 69 | + $filePath = $fileInfo->getPathname(); |
| 70 | + $fileName = $fileInfo->getFilename(); |
71 | 71 |
|
72 | | - if ($fileName[0] === '.' || $fileInfo->isDir()) { |
73 | | - continue; |
74 | | - } |
| 72 | + if ($fileName[0] === '.' || $fileInfo->isDir()) { |
| 73 | + continue; |
| 74 | + } |
75 | 75 |
|
76 | | - $fileContent = file($filePath); |
77 | | - if (strpos($fileContent[0], '#!/bin/bash') === 0) { |
78 | | - $description = ''; |
79 | | - $usage = ''; |
80 | | - $example = ''; |
| 76 | + $fileContent = file($filePath); |
| 77 | + if (str_starts_with($fileContent[0], '#!/bin/bash')) { |
| 78 | + $description = ''; |
| 79 | + $usage = ''; |
| 80 | + $example = ''; |
81 | 81 |
|
82 | | - foreach ($fileContent as $line) { |
83 | | - if (strpos($line, '## Description:') === 0) { |
84 | | - $description = trim(str_replace('## Description:', '', $line)); |
85 | | - } elseif (strpos($line, '## Usage:') === 0) { |
86 | | - $usage = trim(str_replace('## Usage:', '', $line)); |
87 | | - } elseif (strpos($line, '## Example:') === 0) { |
88 | | - $example = trim(str_replace('## Example:', '', $line)); |
89 | | - } |
| 82 | + foreach ($fileContent as $line) { |
| 83 | + if (str_starts_with($line, '## Description:')) { |
| 84 | + $description = trim(str_replace('## Description:', '', $line)); |
| 85 | + } elseif (str_starts_with($line, '## Usage:')) { |
| 86 | + $usage = trim(str_replace('## Usage:', '', $line)); |
| 87 | + } elseif (str_starts_with($line, '## Example:')) { |
| 88 | + $example = trim(str_replace('## Example:', '', $line)); |
90 | 89 | } |
91 | | - |
92 | | - echo "<article><code>ddev $usage</code><br/>$description<br/> <em>Example: $example</em></article>"; |
93 | 90 | } |
| 91 | + |
| 92 | + echo "<article><code>ddev $usage</code><br/>$description<br/> <em>Example: $example</em></article>"; |
94 | 93 | } |
95 | 94 | } |
96 | | - ?> |
| 95 | +} |
| 96 | +?> |
97 | 97 | <details open> |
98 | 98 | <summary><h4>TYPO3 Backend Credentials</h4></summary> |
99 | 99 | <ul> |
100 | | - <li>Username: <code><?php echo($typo3AdminUser); ?></code></li> |
101 | | - <li>Password: <code><?php echo($typo3AdminPassword); ?></code></li> |
| 100 | + <li>Username: <code><?php echo $typo3AdminUser; ?></code></li> |
| 101 | + <li>Password: <code><?php echo $typo3AdminPassword; ?></code></li> |
102 | 102 | </ul> |
103 | 103 | </details> |
104 | 104 | </main> |
|
0 commit comments