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
7924e6d1
Commit
7924e6d1
authored
Jan 28, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed apidoc context for markdown rendering
parent
3f1a0307
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
5 deletions
+9
-5
Markdown.php
extensions/apidoc/helpers/Markdown.php
+4
-0
constSummary.php
extensions/apidoc/templates/html/views/constSummary.php
+1
-1
eventSummary.php
extensions/apidoc/templates/html/views/eventSummary.php
+1
-1
methodSummary.php
extensions/apidoc/templates/html/views/methodSummary.php
+1
-1
propertySummary.php
extensions/apidoc/templates/html/views/propertySummary.php
+1
-1
seeAlso.php
extensions/apidoc/templates/html/views/seeAlso.php
+1
-1
No files found.
extensions/apidoc/helpers/Markdown.php
View file @
7924e6d1
...
...
@@ -34,6 +34,10 @@ class Markdown extends \yii\helpers\Markdown
*/
public
static
function
process
(
$content
,
$context
=
null
)
{
if
(
is_string
(
$context
))
{
$context
=
static
::
$renderer
->
context
->
getType
(
$context
);
}
$content
=
trim
(
parent
::
process
(
$content
,
[]));
if
(
!
strncmp
(
$content
,
'<p>'
,
3
)
&&
substr
(
$content
,
-
4
,
4
)
==
'</p>'
)
{
$content
=
substr
(
$content
,
3
,
-
4
);
...
...
extensions/apidoc/templates/html/views/constSummary.php
View file @
7924e6d1
...
...
@@ -33,7 +33,7 @@ ArrayHelper::multisort($constants, 'name');
<tr
<?=
$constant
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$constant
->
name
?>
"
>
<td>
<?=
$constant
->
name
?>
<a
name=
"
<?=
$constant
->
name
?>
-detail"
></a></td>
<td>
<?=
$constant
->
value
?>
</td>
<td>
<?=
Markdown
::
process
(
$constant
->
shortDescription
.
"
\n
"
.
$constant
->
description
,
$
type
)
?>
</td>
<td>
<?=
Markdown
::
process
(
$constant
->
shortDescription
.
"
\n
"
.
$constant
->
description
,
$
constant
->
definedBy
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$constant
->
definedBy
)
?>
</td>
</tr>
<?php
endforeach
;
?>
...
...
extensions/apidoc/templates/html/views/eventSummary.php
View file @
7924e6d1
...
...
@@ -34,7 +34,7 @@ ArrayHelper::multisort($events, 'name');
<td>
<?=
$this
->
context
->
subjectLink
(
$event
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$event
->
types
)
?>
</td>
<td>
<?=
Markdown
::
process
(
$event
->
shortDescription
,
$
type
)
?>
<?=
Markdown
::
process
(
$event
->
shortDescription
,
$
event
->
definedBy
)
?>
<?php
if
(
!
empty
(
$event
->
since
))
:
?>
(available since version
<?php
echo
$event
->
since
;
?>
)
<?php
endif
;
?>
...
...
extensions/apidoc/templates/html/views/methodSummary.php
View file @
7924e6d1
...
...
@@ -37,7 +37,7 @@ foreach($methods as $method): ?>
<?php
if
(
$protected
&&
$method
->
visibility
==
'protected'
||
!
$protected
&&
$method
->
visibility
!=
'protected'
)
:
?>
<tr
<?=
$method
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$method
->
name
?>
()"
>
<td>
<?=
$this
->
context
->
subjectLink
(
$method
,
$method
->
name
.
'()'
)
?>
</td>
<td>
<?=
Markdown
::
process
(
$method
->
shortDescription
,
$
type
)
?>
</td>
<td>
<?=
Markdown
::
process
(
$method
->
shortDescription
,
$
method
->
definedBy
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$method
->
definedBy
,
$type
)
?>
</td>
</tr>
<?php
endif
;
?>
...
...
extensions/apidoc/templates/html/views/propertySummary.php
View file @
7924e6d1
...
...
@@ -38,7 +38,7 @@ foreach($properties as $property): ?>
<tr
<?=
$property
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$property
->
name
?>
"
>
<td>
<?=
$this
->
context
->
subjectLink
(
$property
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$property
->
types
)
?>
</td>
<td>
<?=
Markdown
::
process
(
$property
->
shortDescription
,
$
type
)
?>
</td>
<td>
<?=
Markdown
::
process
(
$property
->
shortDescription
,
$
property
->
definedBy
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$property
->
definedBy
)
?>
</td>
</tr>
<?php
endif
;
?>
...
...
extensions/apidoc/templates/html/views/seeAlso.php
View file @
7924e6d1
...
...
@@ -25,7 +25,7 @@ if (empty($see)) {
<h4>
See Also
</h4>
<ul>
<?php
foreach
(
$see
as
$ref
)
:
?>
<li>
<?=
\yii\apidoc\helpers\Markdown
::
process
(
$ref
,
$
this
->
context
->
context
->
getType
(
$object
->
definedBy
)
)
?>
</li>
<li>
<?=
\yii\apidoc\helpers\Markdown
::
process
(
$ref
,
$
object
->
definedBy
)
?>
</li>
<?php
endforeach
;
?>
</ul>
</div>
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