43 lines
1.7 KiB
Twig
43 lines
1.7 KiB
Twig
<h5>Public PHP Methods</h5>
|
|
{% if custom.methods|length > 0 %}
|
|
<ul class="collapsible popout" data-collapsible="accordion">
|
|
{% for m in custom.methods %}
|
|
<li id="method-{{m.name}}">
|
|
<div class="collapsible-header">
|
|
<code><strong>{{m.name}}</strong>({{m.params}})</code>
|
|
</div>
|
|
<div class="collapsible-body">
|
|
{% if m.comment is empty %}
|
|
<p>No documentation available.</p>
|
|
{% else %}
|
|
<p>{{m.comment|nl2br}}</p>
|
|
{% endif %}
|
|
|
|
{% if custom.public_source_code is defined and m.can_run == true %}
|
|
<form>
|
|
<div class="padded">
|
|
<input type="hidden" name="class" value="{{object.id |slice(7)}}" />
|
|
<input type="hidden" name="method" value="{{m.name}}" />
|
|
{% for f in m.fields %}
|
|
<div class="input-field">
|
|
<input type="text" id="params-{{m.name}}-{{f.name}}" name="p-{{f.name}}" />
|
|
<label for="params-{{m.name}}-{{f.name}}">{{f.name}}</label>
|
|
</div>
|
|
{% endfor %}
|
|
<button type="submit" class="btn">Execute in phpMAE</button>
|
|
</div>
|
|
<h6 class="console-response-status"></h6>
|
|
<div class="padded"><pre class="console-response"></pre></div>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p>This class has no public methods yet or a problem occurred while retrieving them.</p>
|
|
{% endif %}
|
|
{% if custom.public_source_code is defined %}
|
|
<h5>Source Code</h5>
|
|
<pre class="co-console">{{ custom.public_source_code }}</pre>
|
|
{% endif %} |