Jump to content

AtkNumberAttribute

From NusaATK

Attribute: atkNumberAttribute

API docs | Flags

List of other attributes

atkNumberAttribute screenshot

Description

The atkNumberAttribute is used to represent number values.

Params

The constructor of the atkNumberAttribute has the following params:

 atkNumberAttribute($name, $flags=0, $size=10, $decimals=0)
name String
Name of the attribute (unique within a node, and for most attributes, corresponds to a field in the database.
flags (optional) int
Flags for the attribute. For more information about flags, please checkout the flags section.
Size (optional) int
decimals (optional) int Number of decimals to show.

Examples

(in a node constructor):

 $this->add(new atkNumberAttribute("quantity", AF_OBLIGATORY, 14, 4));

Adds a field 'pieceprice' to the node that displays 14 integer places, and has a precsion of 4 decimal places.

--Rwolverine 19:54, 6 December 2007 (CET)