1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
Bugzilla::Classification</title>
6
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7
<link rel="stylesheet" title="style" type="text/css" href="../style.css" media="all" >
11
<p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents"><<</a></b></p>
12
<h1>Bugzilla::Classification</h1>
13
<div class='indexgroup'>
14
<ul class='indexList indexList1'>
15
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
16
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
17
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
18
<li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
19
<li class='indexItem indexItem1'><a href='#SUBROUTINES'>SUBROUTINES</a>
23
<h1><a class='u' href='#___top' title='click to go to top of document'
27
<p>Bugzilla::Classification - Bugzilla classification class.</p>
29
<h1><a class='u' href='#___top' title='click to go to top of document'
33
<pre class="code"> use Bugzilla::Classification;
35
my $classification = new Bugzilla::Classification(1);
36
my $classification = new Bugzilla::Classification({name => 'Acme'});
38
my $id = $classification->id;
39
my $name = $classification->name;
40
my $description = $classification->description;
41
my $product_count = $classification->product_count;
42
my $products = $classification->products;
44
my $hash_ref = Bugzilla::Classification::get_all_classifications();
45
my $classification = $hash_ref->{1};
48
Bugzilla::Classification::check_classification('AcmeClass');</pre>
50
<h1><a class='u' href='#___top' title='click to go to top of document'
54
<p>Classification.pm represents a Classification object.</p>
56
<p>A Classification is a higher-level grouping of Products.</p>
58
<h1><a class='u' href='#___top' title='click to go to top of document'
63
<dt><a name="new($param)"
64
><code class="code">new($param)</code></a></dt>
67
<pre class="code"> Description: The constructor is used to load an existing
68
classification by passing a classification
69
id or classification name using a hash.
71
Params: $param - If you pass an integer, the integer is the
72
classification_id from the database that we
73
want to read in. If you pass in a hash with
74
'name' key, then the value of the name key
75
is the name of a classification from the DB.
77
Returns: A Bugzilla::Classification object.</pre>
79
<dt><a name="product_count()"
80
><code class="code">product_count()</code></a></dt>
83
<pre class="code"> Description: Returns the total number of products that belong to
88
Returns: Integer - The total of products inside the classification.</pre>
90
<dt><a name="products"
91
><code class="code">products</code></a></dt>
94
<pre class="code"> Description: Returns all products of the classification.
98
Returns: A reference to an array of Bugzilla::Product objects.</pre>
102
<h1><a class='u' href='#___top' title='click to go to top of document'
104
>SUBROUTINES</a></h1>
107
<dt><a name="get_all_classifications()"
108
><code class="code">get_all_classifications()</code></a></dt>
111
<pre class="code"> Description: Returns all classifications.
115
Returns: Bugzilla::Classification object list.</pre>
117
<dt><a name="check_classification($classification_name)"
118
><code class="code">check_classification($classification_name)</code></a></dt>
121
<pre class="code"> Description: Checks if the classification name passed in is a
122
valid classification.
124
Params: $classification_name - String with a classification name.
126
Returns: Bugzilla::Classification object.</pre>
129
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents"><<</a></b></p>