mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Now prototypes are automatically generated with/without default arguments, to better illustrate that they are optional.
85 lines
2.9 KiB
HTML
85 lines
2.9 KiB
HTML
{% extends '_base.html' %}
|
|
|
|
|
|
{% block title -%}
|
|
{{ current_class.name }}:{{ current_method.name }} - Eluna
|
|
{%- endblock %}
|
|
|
|
|
|
{% block description -%}
|
|
API documentation for the {{ current_class.name }}:{{ current_method.name }} method in the Eluna engine.
|
|
{%- endblock %}
|
|
|
|
|
|
{% block document_title -%}
|
|
Method
|
|
<a class="mod" href="{{ root(current_class.name + '/index.html') }}">
|
|
{{- current_class.name -}}
|
|
</a>:<a class="fn" href="{{ root(current_class.name + '/' + current_method.name + '.html') }}">
|
|
{{- current_method.name -}}
|
|
</a>
|
|
{%- endblock %}
|
|
|
|
|
|
{% block sidebar %}
|
|
<h2>{{ current_class.name }} Methods</h2>
|
|
{%- for method in current_class.methods %}
|
|
<a class="fn {{ 'current' if method == current_method }}" href="{{ root(current_class.name + '/' + method.name + '.html') }}">{{ method.name }}</a>
|
|
{%- endfor %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
<div class='docblock'>
|
|
{%- if current_method.documented %}
|
|
{{ current_method.description|parse_links }}
|
|
{%- else %}
|
|
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
|
|
{%- endif %}
|
|
|
|
<h2 id="synopsis" class='section-header'>
|
|
<a href="#synopsis">Synopsis</a>
|
|
</h2>
|
|
{%- for prototype in current_method.prototypes %}
|
|
<p>
|
|
<code>{{ prototype }}</code>
|
|
</p>
|
|
{%- endfor %}
|
|
|
|
<h2 id="arguments" class='section-header'>
|
|
<a href="#arguments">Arguments</a>
|
|
</h2>
|
|
<p>
|
|
{%- if current_method.parameters|length > 0 %}
|
|
{%- for param in current_method.parameters %}
|
|
<dl>
|
|
<dt><code>{{ param.data_type|escape|parse_data_type }} {{ param.name if param.data_type != '...' }} {{- ' (' + param.default_value + ')' if param.default_value }}</code></dt>
|
|
<dd class="docblock">{{ param.description|parse_links if param.description else '<em>See method description.</em>' }}</dd>
|
|
</dl>
|
|
{%- endfor %}
|
|
{%- elif not current_method.documented %}
|
|
Unknown.
|
|
{%- else %}
|
|
None.
|
|
{%- endif %}
|
|
</p>
|
|
|
|
<h2 id="returns" class='section-header'>
|
|
<a href="#returns">Returns</a>
|
|
</h2>
|
|
<p>
|
|
{%- if current_method.returned|length > 0 %}
|
|
{%- for returned in current_method.returned %}
|
|
<dl>
|
|
<dt><code>{{ returned.data_type|escape|parse_data_type }} {{ returned.name }}</code></dt>
|
|
<dd class="docblock">{{ returned.description|parse_links if returned.description else '<em>See method description.</em>' }}</dd>
|
|
</dl>
|
|
{%- endfor %}
|
|
{%- elif not current_method.documented %}
|
|
Unknown.
|
|
{%- else %}
|
|
Nothing.
|
|
{%- endif %}
|
|
</p>
|
|
</div>
|
|
{% endblock %} |