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
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
...
@@ -34,6 +34,10 @@ class Markdown extends \yii\helpers\Markdown
*/
*/
public
static
function
process
(
$content
,
$context
=
null
)
public
static
function
process
(
$content
,
$context
=
null
)
{
{
if
(
is_string
(
$context
))
{
$context
=
static
::
$renderer
->
context
->
getType
(
$context
);
}
$content
=
trim
(
parent
::
process
(
$content
,
[]));
$content
=
trim
(
parent
::
process
(
$content
,
[]));
if
(
!
strncmp
(
$content
,
'<p>'
,
3
)
&&
substr
(
$content
,
-
4
,
4
)
==
'</p>'
)
{
if
(
!
strncmp
(
$content
,
'<p>'
,
3
)
&&
substr
(
$content
,
-
4
,
4
)
==
'</p>'
)
{
$content
=
substr
(
$content
,
3
,
-
4
);
$content
=
substr
(
$content
,
3
,
-
4
);
...
...
extensions/apidoc/templates/html/views/constSummary.php
View file @
7924e6d1
...
@@ -33,7 +33,7 @@ ArrayHelper::multisort($constants, 'name');
...
@@ -33,7 +33,7 @@ ArrayHelper::multisort($constants, 'name');
<tr
<?=
$constant
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$constant
->
name
?>
"
>
<tr
<?=
$constant
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$constant
->
name
?>
"
>
<td>
<?=
$constant
->
name
?>
<a
name=
"
<?=
$constant
->
name
?>
-detail"
></a></td>
<td>
<?=
$constant
->
name
?>
<a
name=
"
<?=
$constant
->
name
?>
-detail"
></a></td>
<td>
<?=
$constant
->
value
?>
</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>
<td>
<?=
$this
->
context
->
typeLink
(
$constant
->
definedBy
)
?>
</td>
</tr>
</tr>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
...
...
extensions/apidoc/templates/html/views/eventSummary.php
View file @
7924e6d1
...
@@ -34,7 +34,7 @@ ArrayHelper::multisort($events, 'name');
...
@@ -34,7 +34,7 @@ ArrayHelper::multisort($events, 'name');
<td>
<?=
$this
->
context
->
subjectLink
(
$event
)
?>
</td>
<td>
<?=
$this
->
context
->
subjectLink
(
$event
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$event
->
types
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$event
->
types
)
?>
</td>
<td>
<td>
<?=
Markdown
::
process
(
$event
->
shortDescription
,
$
type
)
?>
<?=
Markdown
::
process
(
$event
->
shortDescription
,
$
event
->
definedBy
)
?>
<?php
if
(
!
empty
(
$event
->
since
))
:
?>
<?php
if
(
!
empty
(
$event
->
since
))
:
?>
(available since version
<?php
echo
$event
->
since
;
?>
)
(available since version
<?php
echo
$event
->
since
;
?>
)
<?php
endif
;
?>
<?php
endif
;
?>
...
...
extensions/apidoc/templates/html/views/methodSummary.php
View file @
7924e6d1
...
@@ -37,7 +37,7 @@ foreach($methods as $method): ?>
...
@@ -37,7 +37,7 @@ foreach($methods as $method): ?>
<?php
if
(
$protected
&&
$method
->
visibility
==
'protected'
||
!
$protected
&&
$method
->
visibility
!=
'protected'
)
:
?>
<?php
if
(
$protected
&&
$method
->
visibility
==
'protected'
||
!
$protected
&&
$method
->
visibility
!=
'protected'
)
:
?>
<tr
<?=
$method
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$method
->
name
?>
()"
>
<tr
<?=
$method
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$method
->
name
?>
()"
>
<td>
<?=
$this
->
context
->
subjectLink
(
$method
,
$method
->
name
.
'()'
)
?>
</td>
<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>
<td>
<?=
$this
->
context
->
typeLink
(
$method
->
definedBy
,
$type
)
?>
</td>
</tr>
</tr>
<?php
endif
;
?>
<?php
endif
;
?>
...
...
extensions/apidoc/templates/html/views/propertySummary.php
View file @
7924e6d1
...
@@ -38,7 +38,7 @@ foreach($properties as $property): ?>
...
@@ -38,7 +38,7 @@ foreach($properties as $property): ?>
<tr
<?=
$property
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$property
->
name
?>
"
>
<tr
<?=
$property
->
definedBy
!=
$type
->
name
?
' class="inherited"'
:
''
?>
id=
"
<?=
$property
->
name
?>
"
>
<td>
<?=
$this
->
context
->
subjectLink
(
$property
)
?>
</td>
<td>
<?=
$this
->
context
->
subjectLink
(
$property
)
?>
</td>
<td>
<?=
$this
->
context
->
typeLink
(
$property
->
types
)
?>
</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>
<td>
<?=
$this
->
context
->
typeLink
(
$property
->
definedBy
)
?>
</td>
</tr>
</tr>
<?php
endif
;
?>
<?php
endif
;
?>
...
...
extensions/apidoc/templates/html/views/seeAlso.php
View file @
7924e6d1
...
@@ -25,7 +25,7 @@ if (empty($see)) {
...
@@ -25,7 +25,7 @@ if (empty($see)) {
<h4>
See Also
</h4>
<h4>
See Also
</h4>
<ul>
<ul>
<?php
foreach
(
$see
as
$ref
)
:
?>
<?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
;
?>
<?php
endforeach
;
?>
</ul>
</ul>
</div>
</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