Jump to content

AtkNumberAttribute

From NusaATK
Revision as of 16:13, 29 February 2008 by Rwolverine (talk | contribs) (New page: {{attribute}} === Description === The atkNumberAttribute is used to represent number values. === Params === The constructor of the atkCurrencyAttribute has the following params: atkNu...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 atkCurrencyAttribute 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 as US Dollars, and has a precsion of 5 decimal places. The flags hide it from the list view,

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