APIDOC beautification

This commit is contained in:
Carsten Brandt
2014-03-11 06:51:13 +01:00
parent f41f55a00c
commit 5ad0efe36a
15 changed files with 219 additions and 133 deletions

View File

@@ -11,21 +11,22 @@ foreach ($object->tags as $tag) {
if (get_class($tag) == 'phpDocumentor\Reflection\DocBlock\Tag\SeeTag') {
$ref = $tag->getReference();
if (strpos($ref, '://') === false) {
$see[] = '[[' . $ref . ']]';
} else {
$see[] = $ref;
$ref = '[[' . $ref . ']]';
}
$see[] = rtrim(\yii\apidoc\helpers\ApiMarkdown::process($ref . ' ' . $tag->getDescription(), $object->definedBy, true), ". \r\n");
}
}
if (empty($see)) {
return;
} elseif (count($see) == 1) {
echo '<p>See also ' . reset($see) . '.</p>';
} else {
echo '<p>See also:</p><ul>';
foreach ($see as $ref) {
if (substr($ref, -1, 1) != '>') {
$ref .= '.';
}
echo "<li>$ref</li>";
}
echo '</ul>';
}
?>
<div class="SeeAlso">
<h4>See Also</h4>
<ul>
<?php foreach ($see as $ref): ?>
<li><?= \yii\apidoc\helpers\ApiMarkdown::process($ref, $object->definedBy, true) ?></li>
<?php endforeach; ?>
</ul>
</div>