-
Notifications
You must be signed in to change notification settings - Fork 82
IBX-9902: PHP API Ref: Support new PHP features #2709
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
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6f9d3b8
Add enum templates
adriendupuis cb3c12e
Fix enum CSS
adriendupuis c9ed1ec
Add Attributes
adriendupuis 8384fe0
PHP API Ref: Ease Symfony version maintenance
adriendupuis 6f9927f
Add enum to left side menu
adriendupuis e64a5e7
phpdoc.sh: Detail progress feedback
adriendupuis fb875dc
Add enum to namespace toc
adriendupuis 209820a
Sort namespace toc
adriendupuis e31ac34
enum.html.twig: Fix anchor, format
adriendupuis 784a49a
Merge branch 'master' into extend-phpdoc-coverage
adriendupuis f688959
Add enum case signature
adriendupuis 5347fc4
Display enum case signature only if there is a value.
adriendupuis 799df84
class-title.html.twig: Add `readonly` and `final`
adriendupuis f4548fa
Merge branch 'master' into extend-phpdoc-coverage
adriendupuis d603717
Merge remote-tracking branch 'origin/extend-phpdoc-coverage' into ext…
adriendupuis 963b310
Update tools/php_api_ref/.phpdoc/template/components/class-title.html…
adriendupuis 1f728cc
IBX-9902: PHP API Ref: Support new PHP features: HTML (#2712)
adriendupuis 73d8364
Merge branch 'master' into extend-phpdoc-coverage
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
8 changes: 8 additions & 0 deletions
8
tools/php_api_ref/.phpdoc/template/components/enum-case-signature.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,8 @@ | ||
{% set code %}{% apply spaceless %} | ||
{% if node.parent.backedType %} | ||
<span class="phpdocumentor-signature__type">{{ node.parent.backedType }} </span> | ||
{% endif %} | ||
<span class="phpdocumentor-signature__name">{{ node.name }}</span> = <span class="phpdocumentor-signature__default-value">{{ node.value | default('""') }}</span> | ||
{% endapply %}{% endset %} | ||
|
||
{% include 'components/signature.html.twig' with { code } %} |
11 changes: 11 additions & 0 deletions
11
tools/php_api_ref/.phpdoc/template/components/enum-case.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,11 @@ | ||
<article class="phpdocumentor-element-enum-case"> | ||
{% embed 'components/content-header.html.twig' with { node: case, anchor: 'enumcase_' ~ case.name, anchor_link: link(case), header_tag: 'h3' } %} | ||
{% endembed %} | ||
{% include 'components/summary.html.twig' with { node: case } %} | ||
{% if case.value %}{% include 'components/enum-case-signature.html.twig' with { node: case } %}{% endif %} | ||
{% include 'components/deprecation.html.twig' with { node: case } %} | ||
{% include 'components/description.html.twig' with { node: case } %} | ||
{% include 'components/description.html.twig' with { node: case.var[0] } %} | ||
{% include 'components/tags.html.twig' with { node: case } %} | ||
{% include 'components/attributes.html.twig' with { node: case } %} | ||
</article> |
21 changes: 21 additions & 0 deletions
21
tools/php_api_ref/.phpdoc/template/components/enum-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,21 @@ | ||
{% 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 name %} | ||
{{ node.name }} | ||
{% endblock %} | ||
{% block subheader %} | ||
<div class="content-header__subheader"> | ||
Enum | ||
{%- if node.backedType -%} | ||
: {{ node.backedType }} | ||
{% endif %} | ||
</div> | ||
{% endblock %} | ||
{% endembed %} |
2 changes: 1 addition & 1 deletion
2
tools/php_api_ref/.phpdoc/template/components/menu-entry.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% 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/enum-title.html.twig' %} | ||
{% include 'components/element-header.html.twig' %} | ||
{% include 'components/enum-cases.html.twig' %} | ||
{% include 'components/methods.html.twig' %} | ||
{% endblock %} | ||
|
||
{% block on_this_page %} | ||
{% set cases = cases(node) %} | ||
{% set methods = methods(node) %} | ||
|
||
{% if cases 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 cases is not empty %} | ||
<li class="md-nav__item level-1 with-children"> | ||
<a href="{{ node|route("url")|raw }}#cases" title="Cases" class="md-nav__link"> | ||
Cases | ||
</a> | ||
<nav class="md-nav"> | ||
<ul class="md-nav__list"> | ||
{% for case in cases %} | ||
<li class="md-nav__item level-2"> | ||
<a href="{{ link(case) }}" title="{{ case.name }}" class="md-nav__link"> | ||
{{ case.name }} | ||
</a> | ||
</li> | ||
{% 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 %} |
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
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.