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 66 {{ parent () }}
77
88 <script >
9+ window .symfonyVersion = ' {{ symfony_version }}' ;
910 window .addEventListener (' keyup' , (event ) => {
1011 if (event .key === ' /' ) {
1112 event .stopImmediatePropagation ();
Original file line number Diff line number Diff line change 88
99{% block content %}
1010 {% 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' %}
1313 {% include ' components/constants.html.twig' %}
1414 {% include ' components/properties.html.twig' %}
1515 {% include ' components/methods.html.twig' %}
5252 </a >
5353 <nav class =" md-nav" >
5454 <ul class =" md-nav__list" >
55+ {% set treated_properties = [] %}
5556 {% 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 %}
6165 {% endfor %}
6266 </ul >
6367 </nav >
Original file line number Diff line number Diff line change 88 add_edition : true ,
99} %}
1010 {% block subheader %}
11+ {% if node .isAbstract %}
12+ <div class =" content-header__subheader" >Abstract</div >
13+ {% endif %}
14+
1115 {% if node .parent %}
1216 <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' ) }}
2118 </div >
2219 {% endif %}
2320
Original file line number Diff line number Diff line change 88 add_edition : true ,
99} %}
1010 {% block subheader %}
11+ <div class =" content-header__subheader" >Interface</div >
12+
1113 {% if node .parent is not empty %}
1214 <div class =" content-header__subheader" >
1315 Extends
Original file line number Diff line number Diff line change 11{% set properties = properties(node )| sortByVisibility %}
2+ {% set explorable_properties = properties(node )| sortByVisibility %}
3+ {% set treated_properties = [] %}
24
35{% if properties is not empty %}
46 <h2 id =" properties" >
79 </h2 >
810
911 {% 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 %}
1120 {% endfor %}
1221 </section >
1322{% endif %}
Original file line number Diff line number Diff line change 33{% set tags = node .tags | filter((v ,k ) => k not in excluded_tags and not (k starts with ' phpstan-' )) %}
44{% set has_tags = false %}
55{% for name ,seriesOfTag in tags %}
6- {% if name in [' see' , ' uses' ] %}
6+ {% if name in [' see' , ' uses' , ' used-by ' ] %}
77 {% set seriesOfTag = seriesOfTag | filter(tag => ' <a ' in tag .reference |route(' class:short' )) %}
88 {% endif %}
99 {% if seriesOfTag | length > 0 %}
1919 </h5 >
2020 <dl class =" phpdocumentor-tag-list" >
2121 {% for name ,seriesOfTag in tags %}
22- {% if name in [' see' , ' uses' ] %}
22+ {% if name in [' see' , ' uses' , ' used-by ' ] %}
2323 {% set seriesOfTag = seriesOfTag | filter(tag => ' <a ' in tag .reference |route(' class:short' )) %}
2424 {% endif %}
2525 {% 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 99{% block content %}
1010 {% include ' components/breadcrumbs.html.twig' %}
1111 {% include ' components/interface-title.html.twig' %}
12- {% include ( ' components/element-header.html.twig' ) %}
12+ {% include ' components/element-header.html.twig' %}
1313 {% include ' components/constants.html.twig' %}
1414 {% include ' components/methods.html.twig' %}
1515{% 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 6868 <script src =" js/search_custom.js" ></script >
6969 <script src =" js/copy_to_clipboard.js" ></script >
7070 <script src =" js/version_switcher_custom.js" ></script >
71+ <script src =" js/external-links.js" ></script >
7172</body >
7273</html >
You can’t perform that action at this time.
0 commit comments