Function Module_admin_ecommerce->get_form_fields
Definitions
adminzone/pages/modules/admin_ecommerce.php
- Get Tempcode for adding/editing form.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $title | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The title |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | The description |
| $price | REAL | No | No | 9.99 | N/A | N/A | The price |
| $tax_code | ID_TEXT | No | No | 0% | N/A | N/A | The tax code |
| $length | integer | No | No | 12 | N/A | N/A | The length |
| $length_units | SHORT_TEXT | No | No | m | y m d w | N/A | The units for the length |
| $auto_recur | BINARY | No | No | 1 | N/A | N/A | Auto-recur |
| $group_id | ?GROUP | No | No | Null | N/A | N/A | The usergroup that purchasing gains membership to (null: not set) |
| $uses_primary | BINARY | No | No | 0 | N/A | N/A | Whether this is applied to primary usergroup membership |
| $enabled | BINARY | No | No | 1 | N/A | N/A | Whether this is currently enabled |
| $mail_start | ?LONG_TEXT | No | No | Null | N/A | N/A | The text of the e-mail to send out when a subscription is start (null: default) |
| $mail_end | ?LONG_TEXT | No | No | Null | N/A | N/A | The text of the e-mail to send out when a subscription is ended (null: default) |
| $mail_uhoh | ?LONG_TEXT | No | No | Null | N/A | N/A | The text of the e-mail to send out when a subscription cannot be renewed because the subproduct is gone (null: default) |
| $mails | array | No | No | [] | N/A | N/A | Other e-mails to send |
| $id | ?AUTO_LINK | No | No | Null | N/A | N/A | ID of existing subscription (null: new) |
Returns
- A tuple: The input fields, Hidden fields, ...
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for adding/editing form.
*
* @param SHORT_TEXT $title The title
* @param LONG_TEXT $description The description
* @param REAL $price The price
* @param ID_TEXT $tax_code The tax code
* @param integer $length The length
* @param SHORT_TEXT $length_units The units for the length
* @set y m d w
* @param BINARY $auto_recur Auto-recur
* @param ?GROUP $group_id The usergroup that purchasing gains membership to (null: not set)
* @param BINARY $uses_primary Whether this is applied to primary usergroup membership
* @param BINARY $enabled Whether this is currently enabled
* @param ?LONG_TEXT $mail_start The text of the e-mail to send out when a subscription is start (null: default)
* @param ?LONG_TEXT $mail_end The text of the e-mail to send out when a subscription is ended (null: default)
* @param ?LONG_TEXT $mail_uhoh The text of the e-mail to send out when a subscription cannot be renewed because the subproduct is gone (null: default)
* @param array $mails Other e-mails to send
* @param ?AUTO_LINK $id ID of existing subscription (null: new)
* @return array A tuple: The input fields, Hidden fields, ...
*/
public function get_form_fields(string $title = '', string $description = '', float $price = 9.99, string $tax_code = '0%', int $length = 12, string $length_units = 'm', int $auto_recur = 1, ?int $group_id = null, int $uses_primary = 0, int $enabled = 1, ?string $mail_start = null, ?string $mail_end = null, ?string $mail_uhoh = null, array $mails = [], ?int $id = null) : array
* Get Tempcode for adding/editing form.
*
* @param SHORT_TEXT $title The title
* @param LONG_TEXT $description The description
* @param REAL $price The price
* @param ID_TEXT $tax_code The tax code
* @param integer $length The length
* @param SHORT_TEXT $length_units The units for the length
* @set y m d w
* @param BINARY $auto_recur Auto-recur
* @param ?GROUP $group_id The usergroup that purchasing gains membership to (null: not set)
* @param BINARY $uses_primary Whether this is applied to primary usergroup membership
* @param BINARY $enabled Whether this is currently enabled
* @param ?LONG_TEXT $mail_start The text of the e-mail to send out when a subscription is start (null: default)
* @param ?LONG_TEXT $mail_end The text of the e-mail to send out when a subscription is ended (null: default)
* @param ?LONG_TEXT $mail_uhoh The text of the e-mail to send out when a subscription cannot be renewed because the subproduct is gone (null: default)
* @param array $mails Other e-mails to send
* @param ?AUTO_LINK $id ID of existing subscription (null: new)
* @return array A tuple: The input fields, Hidden fields, ...
*/
public function get_form_fields(string $title = '', string $description = '', float $price = 9.99, string $tax_code = '0%', int $length = 12, string $length_units = 'm', int $auto_recur = 1, ?int $group_id = null, int $uses_primary = 0, int $enabled = 1, ?string $mail_start = null, ?string $mail_end = null, ?string $mail_uhoh = null, array $mails = [], ?int $id = null) : array

