mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
95 lines
3.3 KiB
PHP
95 lines
3.3 KiB
PHP
<li class="resource">
|
|
<ul class="endpoints">
|
|
<li class="endpoint">
|
|
<ul class="operations">
|
|
<li class="<?php echo strtolower($method); ?> operation">
|
|
<div class="heading toggler">
|
|
<h3>
|
|
<span class="http_method">
|
|
<a><?php echo $method; ?></a>
|
|
</span>
|
|
<span class="path">
|
|
<?php echo $uri; ?>
|
|
</span>
|
|
</h3>
|
|
<ul class="options">
|
|
<?php if (isset($comment)) : ?>
|
|
<li><?php echo $comment; ?></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
<div class="content" style="display: none;">
|
|
<?php if (isset($requirements) && !empty($requirements)) : ?>
|
|
<h4>Requirements</h4>
|
|
<table class="fullwidth">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($requirements as $key => $value) : ?>
|
|
<tr>
|
|
<td><?php echo $key; ?></td>
|
|
<td><?php echo $value; ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($filters)) : ?>
|
|
<h4>Filters</h4>
|
|
<table class="fullwidth">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Information</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($filters as $name => $info) : ?>
|
|
<tr>
|
|
<td><?php echo $name; ?></td>
|
|
<td>
|
|
<ul>
|
|
<?php foreach ($info as $key => $value) : ?>
|
|
<li><?php echo $key . ': ' . $value; ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($parameters)) : ?>
|
|
<h4>Parameters</h4>
|
|
<table class='fullwidth'>
|
|
<thead>
|
|
<tr>
|
|
<th>Parameter</th>
|
|
<th>Type</th>
|
|
<th>Required?</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($parameters as $name => $info) : ?>
|
|
<tr>
|
|
<td><?php echo $name; ?></td>
|
|
<td><?php echo $info['type']; ?></td>
|
|
<td><?php echo $info['is_required'] ? 'true' : 'false'; ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|