Files
yii2/extensions/apidoc/templates/html/views/constSummary.php
Carsten Brandt 1b7e1cd027 Merge pull request #2605 branch 'feature' of https://github.com/mongosoft/yii2 into code-style
* 'feature' of https://github.com/mongosoft/yii2:
  returned back formatting language files
  code style. WHILE
  code style. FOR
  code style. FOREACH
  code style. operator IF
  @param, @var, @property and @return must declare types as boolean, integer, string, array or null
  short echo tags
  short array syntax

Conflicts:
	extensions/apidoc/commands/RenderController.php
	extensions/apidoc/models/BaseDoc.php
	extensions/apidoc/models/Context.php
	extensions/apidoc/templates/bootstrap/Renderer.php
	extensions/apidoc/templates/bootstrap/layouts/guide.php
	extensions/apidoc/templates/bootstrap/layouts/main.php
	extensions/apidoc/templates/bootstrap/views/index.php
	extensions/apidoc/templates/html/Renderer.php
	extensions/apidoc/templates/offline/views/index.php
	extensions/apidoc/templates/offline/views/offline.php
	extensions/apidoc/templates/online/views/index.php
	extensions/elasticsearch/Connection.php
	extensions/redis/ActiveQuery.php
	framework/base/ErrorException.php
	framework/helpers/BaseFileHelper.php
	tests/unit/framework/helpers/FileHelperTest.php
2014-03-07 21:54:44 +01:00

44 lines
1.2 KiB
PHP

<?php
use yii\apidoc\helpers\ApiMarkdown;
use yii\apidoc\models\ClassDoc;
use yii\helpers\ArrayHelper;
/**
* @var ClassDoc $type
* @var yii\web\View $this
* @var \yii\apidoc\templates\html\ApiRenderer $renderer
*/
$renderer = $this->context;
if (empty($type->constants)) {
return;
}
$constants = $type->constants;
ArrayHelper::multisort($constants, 'name');
?>
<div class="summary docConst">
<h2>Constants</h2>
<p><a href="#" class="toggle">Hide inherited constants</a></p>
<table class="summaryTable table table-striped table-bordered table-hover">
<colgroup>
<col class="col-const" />
<col class="col-description" />
<col class="col-defined" />
</colgroup>
<tr>
<th>Constant</th><th>Value</th><th>Description</th><th>Defined By</th>
</tr>
<?php foreach ($constants as $constant): ?>
<tr<?= $constant->definedBy != $type->name ? ' class="inherited"' : '' ?> id="<?= $constant->name ?>">
<td><?= $constant->name ?><a name="<?= $constant->name ?>-detail"></a></td>
<td><?= $constant->value ?></td>
<td><?= ApiMarkdown::process($constant->shortDescription . "\n" . $constant->description, $constant->definedBy, true) ?></td>
<td><?= $renderer->createTypeLink($constant->definedBy) ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>