Skip to content

Commit 7060ffd

Browse files
committed
PHP API Ref: Link Symfony namespace to GitHub
1 parent 61915b8 commit 7060ffd

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tools/php_api_ref/.phpdoc/template/class.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% block content %}
44
{% include 'components/breadcrumbs.html.twig' %}
5-
{% include 'components/class-title.html.twig' %}
5+
{% include 'components/class-title.html.twig' with { symfony_version: '5.4' } %}
66
{% include('components/element-header.html.twig') %}
77
{% include 'components/constants.html.twig' %}
88
{% include 'components/properties.html.twig' %}

tools/php_api_ref/.phpdoc/template/components/class-title.html.twig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
{% block subheader %}
1111
{% if node.parent %}
1212
<div class="content-header__subheader">
13-
Extends {{ node.parent|route('class:short') }}
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 %}
1421
</div>
1522
{% endif %}
1623

0 commit comments

Comments
 (0)