Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
c624f91d
Commit
c624f91d
authored
Feb 26, 2014
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed typos
parent
d32b3a0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
Generator.php
extensions/gii/generators/extension/Generator.php
+3
-7
README.md
extensions/gii/generators/extension/templates/README.md
+2
-2
No files found.
extensions/gii/generators/extension/Generator.php
View file @
c624f91d
...
...
@@ -14,7 +14,7 @@ use yii\helpers\StringHelper;
/**
* This generator will generate the skeleton files needed by an extension.
*
@property tbd
*
* @author Tobias Munk <schmunk@usrbin.de>
* @since 2.0
*/
...
...
@@ -131,15 +131,11 @@ class Generator extends \yii\gii\Generator
*/
public
function
successMessage
()
{
#if (Yii::$app->hasModule($this->moduleID)) {
# $link = Html::a('try it now', Yii::$app->getUrlManager()->createUrl($this->moduleID), ['target' => '_blank']);
# return "The module has been generated successfully. You may $link.";
#}
$outputPath
=
realpath
(
\Yii
::
getAlias
(
$this
->
outputPath
));
$output1
=
<<<EOD
<p><em>The extension has been generated successfully.</em></p>
<p>To enable it in your application, you need to create a git repository
and require via composer.</p>
and require
it
via composer.</p>
EOD;
$code1
=
<<<EOD
cd {$outputPath}/{$this->packageName}
...
...
@@ -179,7 +175,7 @@ EOD;
<p>When you have finished development register your extension at <a href='https://packagist.org/' target='_blank'>packagist.org</a>.</p>
EOD;
$return
=
$output1
.
'<pre>'
.
highlight_string
(
$code1
,
true
)
.
'</pre>'
;
$return
=
$output1
.
'<pre>'
.
highlight_string
(
$code1
,
true
)
.
'</pre>'
;
$return
.=
$output2
.
'<pre>'
.
highlight_string
(
$code2
,
true
)
.
'</pre>'
;
$return
.=
$output3
.
'<pre>'
.
highlight_string
(
$code3
,
true
)
.
'</pre>'
;
$return
.=
$output4
.
'<pre>'
.
highlight_string
(
$code4
,
true
)
.
'</pre>'
;
...
...
extensions/gii/generators/extension/templates/README.md
View file @
c624f91d
...
...
@@ -12,13 +12,13 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```
php composer.phar require --prefer-dist <?= $generator->vendorName ?>/
yii2-
<?= $generator->packageName ?> "*"
php composer.phar require --prefer-dist <?= $generator->vendorName ?>/<?= $generator->packageName ?> "*"
```
or add
```
"<?= $generator->vendorName ?>/
yii2-
<?= $generator->packageName ?>": "*"
"<?= $generator->vendorName ?>/<?= $generator->packageName ?>": "*"
```
to the require section of your
`composer.json`
file.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment