/** * Constructor. * * @param string $name Name of the attribute * @param int $flags Flags for this attribute * @param string $currencysymbol The symbol which is printed in front of the value. * @param int $decimals The number of decimals (default 2) * @param string $decimalseparator The separator which is printed for the decimals. * @param string $thousandsseparator The separator which is printed for the thousands. */ public function __construct($name, $flags = 0, $currencysymbol = '', $decimals = 2, $decimalseparator = '', $thousandsseparator = '') { parent::__construct($name, $flags, $decimals); $this->setAttribSize(10); if ($currencysymbol == '') { $currencysymbol = Tools::atktext('currencysymbol', 'atk', '', '', '', true); } $this->m_currencysymbol = $currencysymbol; $this->m_decimalseparator = $decimalseparator != '' ? $decimalseparator : '.'; $this->m_thousandsseparator = $thousandsseparator != '' ? $thousandsseparator : ','; $this->setUseThousandsSeparator(true); }
/** * Constructor. * * @param string $name Name of the attribute (unique within a node, and * corresponds to the name of the datetime field * in the database where the stamp is stored. * @param int $flags Flags for the attribute * @param array $extra Array of extra options. these options will be numbered from 2^7 (128) to 2^x. */ public function __construct($name, $flags = 0, $extra = []) { $flags = ($flags | self::AF_HIDE_SEARCH) ^ self::AF_SEARCHABLE; $this->m_extra = $extra; parent::__construct($name, $flags); }