-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathclass.twig
More file actions
70 lines (58 loc) · 2.45 KB
/
Copy pathclass.twig
File metadata and controls
70 lines (58 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends 'default/class.twig' %}
{% from "macros.twig" import method_link, method_source_link, deprecations, internals, todos %}
{% block method %}
{% set signature_plain = block('method_signature')|striptags %}
{% set signature_plain = signature_plain|replace({' ': ' ', "\n": ' ', "\t": ' '})|trim %}
{% for i in 1..5 %}
{% set signature_plain = signature_plain|replace({' ': ' '}) %}
{% endfor %}
<h3 id="method_{{ method.name|raw }}">
<div class="location">{% if method.class is not same as(class) %}{{ 'in %s'|trans|format(method_link(method, false, true))|raw }} {% endif %}{{ method_source_link(method) }}</div>
<code class="method-signature language-php">{{ signature_plain }}</code>
</h3>
<div class="details">
{%- if method.hasSince() -%}
<i>{{ 'Since:'|trans }} {{ method.getSince() }}</i>
<br>
{%- endif -%}
{{ deprecations(method) }}
{{ internals(method) }}
<div class="method-description">
{% if not method.shortdesc and not method.longdesc %}
<p class="no-description">{% trans 'No description' %}</p>
{% else %}
{% if method.shortdesc -%}
<p>{{ method.shortdesc|desc(class)|md_to_html }}</p>
{%- endif %}
{% if method.longdesc -%}
<p>{{ method.longdesc|desc(class)|md_to_html }}</p>
{%- endif %}
{%- endif %}
{{- todos(method) -}}
</div>
<div class="tags">
{% if method.parameters %}
<h4>{% trans 'Parameters' %}</h4>
{{ block('parameters') }}
{% endif %}
{% if method.hintDesc or method.hint %}
<h4 class="return-value-header">{% trans 'Return Value' %}</h4>
<div class="return-value-content">
{{ block('return') }}
</div>
{% endif %}
{% if method.exceptions %}
<h4>{% trans 'Exceptions' %}</h4>
{{ block('exceptions') }}
{% endif %}
{% if method.tags('see') %}
<h4>{% trans 'See also' %}</h4>
{{ block('see') }}
{% endif %}
{% if method.hasExamples() %}
<h4>{% trans 'Examples' %}</h4>
{{ block('examples') }}
{% endif %}
</div>
</div>
{% endblock %}