summaryrefslogtreecommitdiff
path: root/buildscripts/apigen/pradosoft/constant.latte
blob: 441c245d36a05422df5a4eeadd729baf13702178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{*
ApiGen 2.8.0 - API documentation generator for PHP 5.3+

Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com)
Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich)
Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville)

For the full copyright and license information, please view
the file LICENSE.md that was distributed with this source code.
*}
{layout '@layout.latte'}
{var $active = 'constant'}

{block #title}{if $constant->deprecated}Deprecated {/if}Constant {$constant->name}{/block}

{block #content}
<div id="content" class="constant">
	<h1 n:class="$constant->deprecated ? deprecated">Constant {$constant->shortName}</h1>

	{if $constant->valid}

	<div class="description" n:if="$template->longDescription($constant)">
	{!$constant|longDescription}
	</div>

	<div class="info">
		{if $constant->inNamespace()}<b>Namespace:</b> {!$constant->namespaceName|namespaceLinks}<br>{/if}
		{if $constant->inPackage()}<b>Package:</b> {!$constant->packageName|packageLinks}<br>{/if}
		{foreach $template->annotationSort($template->annotationFilter($constant->annotations, array('var'))) as $annotation => $values}
			{foreach $values as $value}
				<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
				{!$value|annotation:$annotation:$constant}<br>
			{/foreach}
		{/foreach}
		<b>Located at</b> <a n:tag-if="$config->sourceCode" href="{$constant|sourceUrl}" title="Go to source code">{$constant->fileName|relativePath}</a><br>
	</div>

	{var $annotations = $constant->annotations}

	<table class="summary" id="vars">
	<caption>Value summary</caption>
	<tr>
		<td class="name"><code>{!$constant->typeHint|typeLinks:$constant}</code></td>
		<td class="value">{block|strip}
			{var $element = $template->resolveElement($constant->valueDefinition, $constant)}
			{if $element}<a href="{$element|constantUrl}">{$constant->valueDefinition}</a>{else}<code>{!$constant->valueDefinition|highlightValue:$constant}</code>{/if}
		{/block}</td>
		<td>{ifset $annotations['var']}{!$annotations['var'][0]|description:$constant}{/ifset}</td>
	</tr>
	</table>

	{else}
		<div class="invalid">
			<p>
				Documentation of this constant could not be generated.
			</p>
			<p>
				Constant was originally declared in {$constant->fileName|relativePath} and is invalid because of:
			</p>
			<ul>
				<li n:foreach="$constant->reasons as $reason">Constant was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
			</ul>
		</div>
	{/if}
</div>
{/block}