Returns a sorted collection of attribute groups of this model. The groups
returned depends on how this model is constructed and what it represents.
(See class-level documentation for details).
The collection of returned groups is sorted first by scope and secondly
by explicit sort order. Global groups always appear before
category-specific groups in the list. Groups of parent categories always
appear before groups belonging to subcategories. At each scope, groups
have an explicit sort order which can be managed within the Business
Manager.
When there are multiple attribute groups with the same ID, the following
rules apply:
- If this model represents the global product attribute group only
(e.g. the no-arg constructor was used), duplicates cannot occur since
only one group can be defined with a given ID at that scope.
- If this model is associated with specific categories (e.g. it is
constructed from a product with a classification category), then a
category product attribute group might have the same ID as a global
product attribute group. In this case, the category group overrides the
global one.
- If a category and one of its ancestor categories both define a
product attribute group with the same ID, the sub-category group
overrides the parent group.
As a result of these rules, this method will never return two attribute
groups with the same ID.