File tree Expand file tree Collapse file tree 11 files changed +154
-19
lines changed
tools/php_api_ref/.phpdoc/template Expand file tree Collapse file tree 11 files changed +154
-19
lines changed Original file line number Diff line number Diff line change 6
6
{{ parent () }}
7
7
8
8
<script >
9
+ window .symfonyVersion = ' {{ symfony_version }}' ;
9
10
window .addEventListener (' keyup' , (event ) => {
10
11
if (event .key === ' /' ) {
11
12
event .stopImmediatePropagation ();
Original file line number Diff line number Diff line change 8
8
9
9
{% block content %}
10
10
{% include ' components/breadcrumbs.html.twig' %}
11
- {% include ' components/class-title.html.twig' with { symfony_version : symfony_version } %}
12
- {% include ( ' components/element-header.html.twig' ) %}
11
+ {% include ' components/class-title.html.twig' %}
12
+ {% include ' components/element-header.html.twig' %}
13
13
{% include ' components/constants.html.twig' %}
14
14
{% include ' components/properties.html.twig' %}
15
15
{% include ' components/methods.html.twig' %}
52
52
</a >
53
53
<nav class =" md-nav" >
54
54
<ul class =" md-nav__list" >
55
+ {% set treated_properties = [] %}
55
56
{% for property in properties | sortByVisibility %}
56
- <li class =" md-nav__item level-2" >
57
- <a href =" {{ link(property ) }}" title =" {{ property .name }}" class =" md-nav__link" >
58
- {{ property .name }}
59
- </a >
60
- </li >
57
+ {% if property.__toString () not in treated_properties %}
58
+ <li class =" md-nav__item level-2" >
59
+ <a href =" {{ link(property ) }}" title =" {{ property .name }}" class =" md-nav__link" >
60
+ {{ property .name }}
61
+ </a >
62
+ </li >
63
+ {% set treated_properties = treated_properties | merge ([property.__toString ()]) %}
64
+ {% endif %}
61
65
{% endfor %}
62
66
</ul >
63
67
</nav >
Original file line number Diff line number Diff line change 8
8
add_edition : true ,
9
9
} %}
10
10
{% block subheader %}
11
+ {% if node .isAbstract %}
12
+ <div class =" content-header__subheader" >Abstract</div >
13
+ {% endif %}
14
+
11
15
{% if node .parent %}
12
16
<div class =" content-header__subheader" >
13
- {% if node .parent .__toString starts with ' \\Symfony\\' %}
14
- Extends
15
- <a href =" {{ ' https://github.com/symfony/symfony/blob/' ~ symfony_version ~ ' /src' ~ node .parent | replace ({' \\' : ' /' }) ~ ' .php' }}" class =" external" >
16
- <abbr title =" {{ node .parent }}" >{{ node .parent .name }}</abbr >
17
- </a >
18
- {% else %}
19
- Extends {{ node .parent | route(' class:short' ) }}
20
- {% endif %}
17
+ Extends {{ node .parent | route(' class:short' ) }}
21
18
</div >
22
19
{% endif %}
23
20
Original file line number Diff line number Diff line change 8
8
add_edition : true ,
9
9
} %}
10
10
{% block subheader %}
11
+ <div class =" content-header__subheader" >Interface</div >
12
+
11
13
{% if node .parent is not empty %}
12
14
<div class =" content-header__subheader" >
13
15
Extends
Original file line number Diff line number Diff line change 1
1
{% set properties = properties(node )| sortByVisibility %}
2
+ {% set explorable_properties = properties(node )| sortByVisibility %}
3
+ {% set treated_properties = [] %}
2
4
3
5
{% if properties is not empty %}
4
6
<h2 id =" properties" >
7
9
</h2 >
8
10
9
11
{% for property in properties %}
10
- {% include ' components/property.html.twig' %}
12
+ {% if property.__toString () not in treated_properties %}
13
+ {% for explored_property in explorable_properties %}
14
+ {% if explored_property.__toString () == property.__toString () %}
15
+ {% include ' components/property.html.twig' with {' property' : explored_property } %}
16
+ {% endif %}
17
+ {% endfor %}
18
+ {% set treated_properties = treated_properties | merge ([property.__toString ()]) %}
19
+ {% endif %}
11
20
{% endfor %}
12
21
</section >
13
22
{% endif %}
Original file line number Diff line number Diff line change 3
3
{% set tags = node .tags | filter((v ,k ) => k not in excluded_tags and not (k starts with ' phpstan-' )) %}
4
4
{% set has_tags = false %}
5
5
{% for name ,seriesOfTag in tags %}
6
- {% if name in [' see' , ' uses' ] %}
6
+ {% if name in [' see' , ' uses' , ' used-by ' ] %}
7
7
{% set seriesOfTag = seriesOfTag | filter(tag => ' <a ' in tag .reference |route(' class:short' )) %}
8
8
{% endif %}
9
9
{% if seriesOfTag | length > 0 %}
19
19
</h5 >
20
20
<dl class =" phpdocumentor-tag-list" >
21
21
{% for name ,seriesOfTag in tags %}
22
- {% if name in [' see' , ' uses' ] %}
22
+ {% if name in [' see' , ' uses' , ' used-by ' ] %}
23
23
{% set seriesOfTag = seriesOfTag | filter(tag => ' <a ' in tag .reference |route(' class:short' )) %}
24
24
{% endif %}
25
25
{% for tag in seriesOfTag %}
Original file line number Diff line number Diff line change
1
+ {% set breadcrumbs = usesNamespaces ? breadcrumbs(node ) : packages(node ) %}
2
+ {% set fqcn = breadcrumbs | map(breadcrumb => breadcrumb .name )| join (' \\' ) ~ ' \\' ~ node .name %}
3
+
4
+ {% embed ' components/content-header.html.twig' with {
5
+ anchor : node .name ,
6
+ anchor_link : ' #' ~ node .name ,
7
+ fqcn ,
8
+ add_edition : true ,
9
+ } %}
10
+ {% block subheader %}
11
+ <div class =" content-header__subheader" >Trait</div >
12
+
13
+ {% if node .usedTraits is not empty %}
14
+ <div class =" content-header__subheader" >
15
+ Uses
16
+ {% for trait in node .usedTraits %}
17
+ {{ trait | route(' class:short' ) }}{% if not loop .last %}, {% endif %}
18
+ {% endfor %}
19
+ </div >
20
+ {% endif %}
21
+ {% endblock %}
22
+ {% endembed %}
Original file line number Diff line number Diff line change 9
9
{% block content %}
10
10
{% include ' components/breadcrumbs.html.twig' %}
11
11
{% include ' components/interface-title.html.twig' %}
12
- {% include ( ' components/element-header.html.twig' ) %}
12
+ {% include ' components/element-header.html.twig' %}
13
13
{% include ' components/constants.html.twig' %}
14
14
{% include ' components/methods.html.twig' %}
15
15
{% endblock %}
Original file line number Diff line number Diff line change
1
+ $ ( ( ) => {
2
+ $ ( 'abbr' ) . each ( ( index , element ) => {
3
+ let $this = $ ( element ) ;
4
+ let fqcn = $this . attr ( 'title' ) ;
5
+ if ( fqcn . startsWith ( '\\Symfony\\' ) && 'a' != $this . parent ( ) . prop ( 'tagName' ) ) {
6
+ let href = 'https://github.com/symfony/symfony/blob/' + symfonyVersion + '/src' + fqcn . replaceAll ( '\\' , '/' ) + '.php' ;
7
+ $this . wrap ( '<a href="' + href + '" class="external">' ) ;
8
+ }
9
+ } ) ;
10
+ } )
Original file line number Diff line number Diff line change 68
68
<script src =" js/search_custom.js" ></script >
69
69
<script src =" js/copy_to_clipboard.js" ></script >
70
70
<script src =" js/version_switcher_custom.js" ></script >
71
+ <script src =" js/external-links.js" ></script >
71
72
</body >
72
73
</html >
You can’t perform that action at this time.
0 commit comments