eventSummary.php 1.02 KB
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->events)) {
11 12 13 14 15 16 17 18 19 20 21 22 23 24
	return;
} ?>
<div class="summary docEvent">
<h2>Events</h2>

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

<table class="summaryTable">
<colgroup>
	<col class="col-event" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>
<tr>
25
  <th>Event</th><th>Type</th><th>Description</th><th>Defined By</th>
26
</tr>
Carsten Brandt committed
27 28
<?php foreach($type->events as $event): ?>
<tr<?= $event->definedBy != $type->name ? ' class="inherited"' : '' ?> id="<?= $event->name ?>">
29 30 31
	<td><?= $this->context->subjectLink($event) ?></td>
	<td><?= $this->context->typeLink($event->types) ?></td>
	<td>
32
		<?= Markdown::process($event->shortDescription, $type) ?>
33 34 35 36 37
		<?php if(!empty($event->since)): ?>
			(available since version <?php echo $event->since; ?>)
		<?php endif; ?>
	</td>
	<td><?= $this->context->typeLink($event->definedBy) ?></td>
38 39 40 41
</tr>
<?php endforeach; ?>
</table>
</div>