{% macro class_category_name(categoryId) -%} {% if categoryId == 1 %}{% trans 'class' %}{% endif %} {% if categoryId == 2 %}{% trans 'interface' %}{% endif %} {% if categoryId == 3 %}{% trans 'trait' %}{% endif %} {%- endmacro %} {% macro namespace_link(namespace) -%} {{ namespace == '' ? global_namespace_name() : namespace|raw }} {%- endmacro %} {% macro class_link(class, absolute) -%} {%- if class.isProjectClass() -%} {%- elseif class.isPhpClass() -%} {%- endif %} {{- abbr_class(class, absolute|default(false)) }} {%- if class.isProjectClass() or class.isPhpClass() %}{% endif %} {%- endmacro %} {% macro method_link(method, absolute, classonly) -%} {# #} {# #}{{- abbr_class(method.class) }}{% if not classonly|default(false) %}::{{ method.name|raw }}{% endif -%} {# #} {%- endmacro %} {% macro property_link(property, absolute, classonly) -%} {# #} {# #}{{- abbr_class(property.class) }}{% if not classonly|default(false) %}#{{ property.name|raw }}{% endif -%} {# #} {%- endmacro %} {% macro hint_link(hints, isIntersectionType = false) -%} {%- from _self import class_link %} {%- if hints %} {%- for hint in hints %} {%- if hint.class %} {{- class_link(hint.name) }} {%- elseif hint.name %} {{- abbr_class(hint.name) }} {%- endif %} {%- if hint.array %}[]{% endif %} {%- if not loop.last %}{%- if isIntersectionType %}&{% else %}|{% endif %}{% endif %} {%- endfor %} {%- endif %} {%- endmacro %} {% macro source_link(project, class) -%} {% if class.sourcepath %} ({% trans 'View source'%}) {%- endif %} {%- endmacro %} {% macro method_source_link(method) -%} {% if method.sourcepath %} {#- l10n: Method at line %s -#} {{'at line %s'|trans|format( method.line )|raw }} {%- else %} {#- l10n: Method at line %s -#} {{- 'at line %s'|trans|format( method.line )|raw -}} {%- endif %} {%- endmacro %} {% macro method_parameters_signature(method) -%} {%- from "macros.twig" import hint_link -%} ( {%- for parameter in method.parameters %} {%- if parameter.hashint %}{{ hint_link(parameter.hint, parameter.isIntersectionType()) }} {% endif -%} {%- if parameter.variadic %}...{% endif %}${{ parameter.name|raw }} {%- if parameter.default is not null %} = {{ parameter.default }}{% endif %} {%- if not loop.last %}, {% endif %} {%- endfor -%} ) {%- endmacro %} {% macro function_parameters_signature(method) -%} {%- from "macros.twig" import hint_link -%} ( {%- for parameter in method.parameters %} {%- if parameter.hashint %}{{ hint_link(parameter.hint, parameter.isIntersectionType()) }} {% endif -%} {%- if parameter.variadic %}...{% endif %}${{ parameter.name|raw }} {%- if parameter.default is not null %} = {{ parameter.default }}{% endif %} {%- if not loop.last %}, {% endif %} {%- endfor -%} ) {%- endmacro %} {% macro render_classes(classes) -%} {% from _self import class_link, deprecated %}
{{ deprecated(reflection )}} {% for tag in reflection.deprecated %}
| {% trans 'internal' %} | {{ internalTag[0]|raw }} {{ internalTag[1:]|join(' ')|raw }} |
{% for categoryTag in reflection.getCategories() %} {% for category in categoryTag %} {{ category }} {% endfor %} {% endfor %}
{% endif %} {% endmacro %} {% macro todo(reflection) %} {% if project.config('insert_todos') == true %} {% if reflection.todo %}{% trans 'todo' %}{% endif %} {% endif %} {% endmacro %} {% macro todos(reflection) %} {% from _self import todo %} {% if reflection.todo %}{{ todo(reflection )}} {% for tag in reflection.todo %}