5.7.13. Bugzilla::Classification¶
5.7.13.1. NAME¶
Bugzilla::Classification - Bugzilla classification class.
5.7.13.2. SYNOPSIS¶
use Bugzilla::Classification;
my $classification = new Bugzilla::Classification(1);
my $classification = new Bugzilla::Classification({name => 'Acme'});
my $id = $classification->id;
my $name = $classification->name;
my $description = $classification->description;
my $sortkey = $classification->sortkey;
my $product_count = $classification->product_count;
my $products = $classification->products;
5.7.13.3. DESCRIPTION¶
Classification.pm represents a classification object. It is an implementation of Bugzilla::Object, and thus provides all methods that Bugzilla::Object provides.
The methods that are specific to Bugzilla::Classification
are listed
below.
A Classification is a higher-level grouping of Products.
5.7.13.4. METHODS¶
product_count()
Description: Returns the total number of products that belong to the classification. Params: none. Returns: Integer - The total of products inside the classification.
products
Description: Returns all products of the classification. Params: none. Returns: A reference to an array of Bugzilla::Product objects.
5.7.13.5. SUBROUTINES¶
sort_products_by_classification
Description: This is a helper which returns a list of products sorted by classification in a form suitable to be passed to the global/choose-product.html.tmpl template. Params: An arrayref of product objects. Returns: An arrayref of hashes suitable to be passed to global/choose-product.html.tmpl.