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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c2457f95
Commit
c2457f95
authored
Oct 16, 2013
by
Luciano Baraglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GII sub-modules support - see #871
parent
bce3afcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Generator.php
framework/yii/gii/generators/controller/Generator.php
+1
-1
Generator.php
framework/yii/gii/generators/module/Generator.php
+4
-5
No files found.
framework/yii/gii/generators/controller/Generator.php
View file @
c2457f95
...
@@ -197,7 +197,7 @@ class Generator extends \yii\gii\Generator
...
@@ -197,7 +197,7 @@ class Generator extends \yii\gii\Generator
*/
*/
public
function
getModule
()
public
function
getModule
()
{
{
if
((
$pos
=
strpos
(
$this
->
controller
,
'/'
))
!==
false
)
{
if
((
$pos
=
str
r
pos
(
$this
->
controller
,
'/'
))
!==
false
)
{
$id
=
substr
(
$this
->
controller
,
0
,
$pos
);
$id
=
substr
(
$this
->
controller
,
0
,
$pos
);
if
((
$module
=
Yii
::
$app
->
getModule
(
$id
))
!==
null
)
{
if
((
$module
=
Yii
::
$app
->
getModule
(
$id
))
!==
null
)
{
return
$module
;
return
$module
;
...
...
framework/yii/gii/generators/module/Generator.php
View file @
c2457f95
...
@@ -87,18 +87,17 @@ class Generator extends \yii\gii\Generator
...
@@ -87,18 +87,17 @@ class Generator extends \yii\gii\Generator
$output
=
<<<EOD
$output
=
<<<EOD
<p>The module has been generated successfully.</p>
<p>The module has been generated successfully.</p>
<p>To access the module, you need to
modify the application configuration as follows
:</p>
<p>To access the module, you need to
add this to your application configuration
:</p>
EOD;
EOD;
$code
=
<<<EOD
$code
=
<<<EOD
<?php
<?php
return array(
......
'modules'
=>
array(
'modules'
=>
array(
'{$this->moduleID}' => array(
'{$this->moduleID}' => array(
'class' => '{$this->moduleClass}',
'class' => '{$this->moduleClass}',
),
),
),
),
......
......
);
EOD;
EOD;
return
$output
.
'<pre>'
.
highlight_string
(
$code
,
true
)
.
'</pre>'
;
return
$output
.
'<pre>'
.
highlight_string
(
$code
,
true
)
.
'</pre>'
;
...
...
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