Path

7x / documentation / ez publish / technical manual / 3.10 / reference / objects / ezmultioption2


Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

ezmultioption2

Summary

Contains information about a group of multi-options.

Persistent

No.

Attributes

The ezmultioption2 objects can be used to store information about the following:

  • Ordinary groups of multi-options (top level groups that are described in the reference documentation of the "Multi-option2" datatype; these groups can be managed from within the administration interface).
  • A virtual root group that is located one level above the ordinary group (the parent of all groups); it is not visible from within the administration interface.
  • Virtual subgroups of multi-options (such a group contains all multi-options that are located one level beneath an existing multi-option; subgroups are not visible from within the administration interface).

For example, let's say the site administrator creates the following multi-level structure with two groups of multi-options called "Exterior" and "Interior":

Exterior
- Body: Sedan, Combi, Hatchback
- Color: Black, Red
-- Bumpers: Same as body, Non-painted
-- Mirrors: Silver, Same as body, Non-painted
 
Interior
- Seats: Make your choice, Cloth, Leather

In this case, the system will create "ezmultioption2" objects that store information about top level groups ("Exterior" and "Interior"), their parent group (virtual root group), plus an unnamed subgroup that contains the "Bumpers" and "Mirrors" multi-options.

The following table reveals the structure of "ezmultioption2" objects.

Attribute

Type

Static*

Description

name

string

Yes.

The name of the group (for example "Exterior") if the object represents a top level group of multi-options; otherwise an empty string will be returned (subgroups and root groups are unnamed).

id

integer

Yes.

Not in use.

group_id

integer

Yes.

The ID number of the group/subgroup (for example 2). 0 means that the object represents a root group.

rules

array

Yes.

The dependency rules for nested multi-options as an array of arrays if the object represents a root group; otherwise an empty array will be returned.

multioption_list

array

Yes.

The multi-options that belong to the group/subgroup as an array of hashes. (If the object represents a root group, an empty array will be returned.) Each hash describes a multi-option located at the first level in the group/subgroup. The hash-structure consists of the following elements:

Attribute

Type

Description

id

integer

The internal ID number of the multi-option (unique within the group/subgroup that the multi-option belongs to).

multioption_id

string

The ID number of the multi-option (for example 2).

name

string

The name of the multi-option (for example "Color").

priority

string

Reserved for future use.

default_option_id

string

The ID number of the default option.

imageoption

integer

1 if one or more images are added to the options in the multi-option, FALSE otherwise.

optionlist

array

The options that belong to the multi-option as an array of hashes. Each hash consists of the following elements:

Attribute

Type

Description

id

integer

The internal ID number of the option (unique within the multi-option that the option belongs to).

option_id

string

The ID number of the option.

value

string

The option text (for example "Red").

additional_price

string

Additional price (for example "100").

is_selectable

string

1 if the option is not disabled, otherwise 0.

child_group

object

The subgroup (as an ezmultioption2 object) that contains all multi-options located one level beneath this one. If there are no nested multi-options, this element will not be returned.

optiongroup_list

array

Yes.

The top level groups (as ezmultioption2 objects) if the object represents a root group; otherwise an empty array will be returned.

Julia Shymova (16/08/2007 10:56 am)

Julia Shymova (30/08/2007 11:08 am)


Comments

There are no comments.