Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZProductAttribute Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| get ( $id=-1)
& | getAll ()
| delete ()
| id ()
| name ()
| unit ()
| attributeType ()
| type ()
| setName ( $value)
| setUnit ( $value)
| setType ( $type)
| setAttributeType ( $attributeType)
| setValue ( $product, $value)
| value ( $product)
| moveUp ()
| moveDown ()

## Public Attributes
| $ID
| $TypeID
| $Name
| $AttributeType
| $Placement
| $Unit

## Detailed Description

! eZTrade This class handles different product attributes.

$attribute = new eZProductAttribute();
$attribute->setType( $type );
$attribute->setName( "Doors" );
$attribute->store();
eZProductAttribute
Definition: ezproductattribute.php:49
$type
$type
Definition: classes/admin/linkselect.php:220

See also
  eZProduct

Definition at line 48 of file ezproductattribute.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZProductAttribute::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZProductAttribute object. Retrieves the data from the database if a valid id is given as an argument.

Definition at line 54 of file ezproductattribute.php.

References $id, and $ID.

## Member Function Documentation

## ◆ attributeType()

eZProductAttribute::attributeType | ( |  | ) |

Returns the class of the attribute.

1 = normal attribute 2 = header

Definition at line 213 of file ezproductattribute.php.

References $AttributeType.

## ◆ delete()

eZProductAttribute::delete | ( |  | ) |

Deletes a option from the database.

Definition at line 172 of file ezproductattribute.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ get()

eZProductAttribute::get | ( |  | $id = `-1` | ) |

Fetches the product attribute object values from the database.

Definition at line 124 of file ezproductattribute.php.

References $db, $id, eZDB\globalDatabase(), and Name.

## ◆ getAll()

& eZProductAttribute::getAll | ( |  | ) |

Retrieves every option from the database.

Definition at line 152 of file ezproductattribute.php.

References $db, $i, and eZDB\globalDatabase().

## ◆ id()

eZProductAttribute::id | ( |  | ) |

Returns the object ID to the option. This is the unique ID stored in the database.

Definition at line 186 of file ezproductattribute.php.

References $ID.

## ◆ moveDown()

eZProductAttribute::moveDown | ( |  | ) |

Moves this item down one step in the order list, this means that it will swap place with the item below.

Definition at line 366 of file ezproductattribute.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ moveUp()

eZProductAttribute::moveUp | ( |  | ) |

Moves this item up one step in the order list, this means that it will swap place with the item above.

Definition at line 349 of file ezproductattribute.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ name()

eZProductAttribute::name | ( |  | ) |

Returns the name of the attribute.

Definition at line 194 of file ezproductattribute.php.

References $Name.

## ◆ setAttributeType()

eZProductAttribute::setAttributeType | ( |  | $attributeType | ) |

Sets the type of the attribute.

1 = normal attribute 2 = header

Definition at line 262 of file ezproductattribute.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ setName()

eZProductAttribute::setName | ( |  | $value | ) |

Sets the name of the attribute.

Definition at line 232 of file ezproductattribute.php.

References Name.

## ◆ setType()

eZProductAttribute::setType | ( |  | $type | ) |

Sets the type of the attribute.

Definition at line 248 of file ezproductattribute.php.

References $type.

## ◆ setUnit()

eZProductAttribute::setUnit | ( |  | $value | ) |

Sets the measuring unit of the attribute.

Definition at line 240 of file ezproductattribute.php.

## ◆ setValue()

eZProductAttribute::setValue | ( |  | $product,
|  |  | $value
| ) |  |

Sets the attribute value for the given product.

Definition at line 281 of file ezproductattribute.php.

References $db, $product, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ store()

eZProductAttribute::store | ( |  | ) |

Stores a eZProductattribute object to the database.

Definition at line 66 of file ezproductattribute.php.

References $db, $res, eZDB\finish(), eZDB\globalDatabase(), and Name.

## ◆ type()

eZProductAttribute::type | ( |  | ) |

Returns the type of the attribute.

Definition at line 222 of file ezproductattribute.php.

References $type.

## ◆ unit()

eZProductAttribute::unit | ( |  | ) |

Returns the measuring unit of the attribute.

Definition at line 202 of file ezproductattribute.php.

References $Unit.

## ◆ value()

eZProductAttribute::value | ( |  | $product | ) |

Returns the attribute value to the given product.

Definition at line 325 of file ezproductattribute.php.

References $db, $product, $ret, and eZDB\globalDatabase().

## Member Data Documentation

## ◆ $AttributeType

eZProductAttribute::$AttributeType

Definition at line 385 of file ezproductattribute.php.

Referenced by attributeType().

## ◆ $ID

eZProductAttribute::$ID

Definition at line 382 of file ezproductattribute.php.

Referenced by __construct(), and id().

## ◆ $Name

eZProductAttribute::$Name

Definition at line 384 of file ezproductattribute.php.

Referenced by name().

## ◆ $Placement

eZProductAttribute::$Placement

Definition at line 386 of file ezproductattribute.php.

## ◆ $TypeID

eZProductAttribute::$TypeID

Definition at line 383 of file ezproductattribute.php.

## ◆ $Unit

eZProductAttribute::$Unit

Definition at line 387 of file ezproductattribute.php.

Referenced by unit().

The documentation for this class was generated from the following file:

- ezproductattribute.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.