constSummary.php 998 Bytes
Newer Older
1 2
<?php

3
use yii\apidoc\helpers\Markdown;
4 5
use yii\apidoc\models\ClassDoc;
/**
Carsten Brandt committed
6
 * @var ClassDoc $type
7 8 9
 * @var yii\web\View $this
 */

Carsten Brandt committed
10
if (empty($type->constants)) {
11 12 13 14 15 16 17 18 19 20 21 22 23 24
	return;
} ?>
<div class="summary docConst">
<h2>Constants</h2>

<p><a href="#" class="toggle">Hide inherited constants</a></p>

<table class="summaryTable">
<colgroup>
	<col class="col-const" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>
<tr>
25
  <th>Constant</th><th>Value</th><th>Description</th><th>Defined By</th>
26
</tr>
Carsten Brandt committed
27
<?php foreach($type->constants as $constant): ?>
28
	<tr<?= $constant->definedBy != $type->name ? ' class="inherited"' : '' ?> id="<?= $constant->name ?>">
29
	  <td><?= $constant->name ?><a name="<?= $constant->name ?>-detail"></a></td>
30
	  <td><?= $constant->value ?></td>
31
	  <td><?= Markdown::process($constant->shortDescription . "\n" . $constant->description, $type) ?></td>
32 33
	  <td><?= $this->context->typeLink($constant->definedBy) ?></td>
	</tr>
34 35 36
<?php endforeach; ?>
</table>
</div>