-
Notifications
You must be signed in to change notification settings - Fork 81
Enhance PHP API Ref #2584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Enhance PHP API Ref #2584
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2c545b4
.phpdoc/template/components/tags.html.twig: Handle @used-by
adriendupuis 3718039
.phpdoc/template/components/properties.html.twig: Get duplicates clos…
adriendupuis 9ca44d1
.phpdoc/template/class.html.twig: Deduplicates properties
adriendupuis adf8181
.phpdoc/template: Indicate interface or abstract
adriendupuis cb1243e
.phpdoc/template/trait.html.twig: Add missing template
adriendupuis 0bf3893
.phpdoc/template/: Redo external links to GitHub using JS
adriendupuis 723cfcf
Merge branch 'master' into enh-php-api-ref
adriendupuis dfc05ab
.phpdoc/template/: Unify {% include %} VS {{ include() }} usage
adriendupuis 16d6b59
.phpdoc/template/base.html.twig: Declare Symfony version only once
adriendupuis 559140f
.phpdoc/template/: Minor formatting
adriendupuis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tools/php_api_ref/.phpdoc/template/components/trait-title.html.twig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| {% set breadcrumbs = usesNamespaces ? breadcrumbs(node) : packages(node) %} | ||
| {% set fqcn = breadcrumbs|map(breadcrumb => breadcrumb.name)|join('\\') ~ '\\' ~ node.name %} | ||
|
|
||
| {% embed 'components/content-header.html.twig' with { | ||
| anchor: node.name, | ||
| anchor_link: '#' ~ node.name, | ||
| fqcn, | ||
| add_edition: true, | ||
| } %} | ||
| {% block subheader %} | ||
| <div class="content-header__subheader">Trait</div> | ||
|
|
||
| {% if node.usedTraits is not empty %} | ||
| <div class="content-header__subheader"> | ||
| Uses | ||
| {% for trait in node.usedTraits %} | ||
| {{ trait|route('class:short') }}{% if not loop.last %}, {% endif %} | ||
| {% endfor %} | ||
| </div> | ||
| {% endif %} | ||
| {% endblock %} | ||
|
|
||
| {% endembed %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| $(() => { | ||
| $('abbr').each((index, element) => { | ||
| let $this = $(element); | ||
| let fqcn = $this.attr('title'); | ||
| if (fqcn.startsWith('\\Symfony\\') && 'a' != $this.parent().prop('tagName')) { | ||
| let href = 'https://github.com/symfony/symfony/blob/' + symfonyVersion + '/src' + fqcn.replaceAll('\\', '/') + '.php'; | ||
| $this.wrap('<a href="' + href + '" class="external">'); | ||
| } | ||
| }); | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| {% extends 'base.html.twig' %} | ||
|
|
||
| {% block title %}{{ node.name }} | {{ parent() }}{% endblock %} | ||
| {% block meta %} | ||
| <meta name="description" content="{{ node.summary|escape }}" /> | ||
| {{ parent() }} | ||
| {% endblock %} | ||
|
|
||
| {% block content %} | ||
| {% include 'components/breadcrumbs.html.twig' %} | ||
| {% include 'components/trait-title.html.twig' %} | ||
| {% include('components/element-header.html.twig') %} | ||
| {% include 'components/constants.html.twig' %} | ||
| {% include 'components/properties.html.twig' %} | ||
| {% include 'components/methods.html.twig' %} | ||
| {% endblock %} | ||
|
|
||
| {% block on_this_page %} | ||
| {% set constants = constants(node) %} | ||
| {% set properties = properties(node) %} | ||
| {% set methods = methods(node) %} | ||
|
|
||
| {% if constants is not empty or properties is not empty or methods is not empty %} | ||
| <label class="md-nav__title" for="__toc" title="{{ node.name }}"> | ||
| {{ node.name }} | ||
| </label> | ||
| {% endif %} | ||
|
|
||
| <ul class="md-nav__list"> | ||
| {% if constants is not empty %} | ||
| <li class="md-nav__item level-1 with-children"> | ||
| <a href="{{ node|route("url")|raw }}#constants" title="Constants" class="md-nav__link"> | ||
| Constants | ||
| </a> | ||
| <nav class="md-nav"> | ||
| <ul class="md-nav__list"> | ||
| {% for constant in constants|sortByVisibility %} | ||
| <li class="md-nav__item level-2"> | ||
| <a href="{{ link(constant) }}" title="{{ constant.name }}" class="md-nav__link"> | ||
| {{ constant.name }} | ||
| </a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| </nav> | ||
| </li> | ||
| {% endif %} | ||
| {% if properties is not empty %} | ||
| <li class="md-nav__item level-1 with-children"> | ||
| <a href="{{ node|route("url")|raw }}#properties" title="Properties" class="md-nav__link"> | ||
| Properties | ||
| </a> | ||
| <nav class="md-nav"> | ||
| <ul class="md-nav__list"> | ||
| {% set treated_properties = [] %} | ||
| {% for property in properties|sortByVisibility %} | ||
| {% if property.__toString() not in treated_properties %} | ||
| <li class="md-nav__item level-2"> | ||
| <a href="{{ link(property) }}" title="{{ property.name }}" class="md-nav__link"> | ||
| {{ property.name }} | ||
| </a> | ||
| </li> | ||
| {% set treated_properties = treated_properties|merge([property.__toString()]) %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| </ul> | ||
| </nav> | ||
| </li> | ||
| {% endif %} | ||
| {% if methods is not empty %} | ||
| <li class="md-nav__item level-1 with-children"> | ||
| <a href="{{ node|route("url")|raw }}#methods" title="Methods" class="md-nav__link"> | ||
| Methods | ||
| </a> | ||
| <nav class="md-nav"> | ||
| <ul class="md-nav__list"> | ||
| {% for method in methods|sortByVisibility %} | ||
| <li class="md-nav__item level-2"> | ||
| <a href="{{ link(method) }}" title="{{ method.name }}" class="md-nav__link"> | ||
| {{ method.name }}() | ||
| </a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| </nav> | ||
| </li> | ||
| {% endif %} | ||
| </ul> | ||
| {% endblock %} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.