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
b0d7559a
Commit
b0d7559a
authored
Mar 09, 2014
by
Christian Nadolle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console/Controller show help for local options
parent
05f7df30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
HelpController.php
framework/console/controllers/HelpController.php
+6
-3
No files found.
framework/console/controllers/HelpController.php
View file @
b0d7559a
...
...
@@ -287,7 +287,7 @@ class HelpController extends Controller
}
$tags
=
$this
->
parseComment
(
$method
->
getDocComment
());
$options
=
$this
->
getOptionHelps
(
$controller
);
$options
=
$this
->
getOptionHelps
(
$controller
,
$actionID
);
if
(
$tags
[
'description'
]
!==
''
)
{
$this
->
stdout
(
"
\n
DESCRIPTION
\n
"
,
Console
::
BOLD
);
...
...
@@ -317,7 +317,6 @@ class HelpController extends Controller
echo
implode
(
"
\n\n
"
,
array_merge
(
$required
,
$optional
))
.
"
\n\n
"
;
}
$options
=
$this
->
getOptionHelps
(
$controller
);
if
(
!
empty
(
$options
))
{
$this
->
stdout
(
"
\n
OPTIONS
\n\n
"
,
Console
::
BOLD
);
echo
implode
(
"
\n\n
"
,
$options
)
.
"
\n\n
"
;
...
...
@@ -360,11 +359,15 @@ class HelpController extends Controller
/**
* Returns the help information about the options available for a console controller.
* @param Controller $controller the console controller
* @param String|null $actionID name of the action, if set include local options for that action
* @return array the help information about the options
*/
protected
function
getOptionHelps
(
$controller
)
protected
function
getOptionHelps
(
$controller
,
$actionID
=
null
)
{
$optionNames
=
$controller
->
globalOptions
();
if
(
!
empty
(
$actionID
))
{
$optionNames
=
array_merge
(
$optionNames
,
$controller
->
localOptions
(
$actionID
));
}
if
(
empty
(
$optionNames
))
{
return
[];
}
...
...
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