bugzilla-4intranet/docs/en/html/api/Bugzilla/Template.html

96 lines
3.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Bugzilla::Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" title="style" type="text/css" href=".././../../../style.css" media="all" >
</head>
<body id="pod">
<p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents">&lt;&lt;</a></b></p>
<h1>Bugzilla::Template</h1>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<li class='indexItem indexItem1'><a href='#SUBROUTINES'>SUBROUTINES</a>
<li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
<li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>Bugzilla::Template - Wrapper around the Template Toolkit <code class="code">Template</code> object</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>
<pre class="code"> my $template = Bugzilla::Template-&#62;create;
my $format = $template-&#62;get_format(&#34;foo/bar&#34;,
scalar($cgi-&#62;param(&#39;format&#39;)),
scalar($cgi-&#62;param(&#39;ctype&#39;)));</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>This is basically a wrapper so that the correct arguments get passed into the <code class="code">Template</code> constructor.</p>
<p>It should not be used directly by scripts or modules - instead, use <code class="code">Bugzilla-&#62;instance-&#62;template</code> to get an already created module.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SUBROUTINES"
>SUBROUTINES</a></h1>
<dl>
<dt><a name="precompile_templates($output)"
><code class="code">precompile_templates($output)</code></a></dt>
<dd>
<p>Description: Compiles all of Bugzilla&#39;s templates in every language. Used mostly by <em class="code">checksetup.pl</em>.</p>
<p>Params: <code class="code">$output</code> - <code class="code">true</code> if you want the function to print out information about what it&#39;s doing.</p>
<p>Returns: nothing</p>
</dd>
</dl>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>
<dl>
<dt><a name="get_format($file,_$format,_$ctype)"
><code class="code">get_format($file, $format, $ctype)</code></a></dt>
<dd>
<pre class="code"> Description: Construct a format object from URL parameters.
Params: $file - Name of the template to display.
$format - When the template exists under several formats
(e.g. table or graph), specify the one to choose.
$ctype - Content type, see Bugzilla::Constants::contenttypes.
Returns: A format object.</pre>
</dd>
</dl>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>
<p><a href="../Bugzilla.html" class="podlinkpod"
>Bugzilla</a>, <a href="../Template.html" class="podlinkpod"
>Template</a></p>
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents">&lt;&lt;</a></b></p>
<!-- end doc -->
</body></html>