Function Hook_ecommerce_custom->_get_fields
Definitions
sources/hooks/systems/ecommerce/custom.php
- Get fields for adding/editing one of these.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $hidden | Tempcode | No | No | required parameter | N/A | N/A | Hidden fields |
| $name_suffix | string | No | No | Blank (empty string) | N/A | N/A | What to place onto the end of the field name |
| $title | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Title |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Description |
| $image_url | URLPATH | No | No | Blank (empty string) | N/A | N/A | Image URL |
| $enabled | BINARY | No | No | 1 | N/A | N/A | Whether it is enabled |
| $price | ?REAL | No | No | Null | N/A | N/A | The price (null: not set) |
| $tax_code | ID_TEXT | No | No | 0% | N/A | N/A | The tax code |
| $shipping_cost | REAL | No | No | 0 | N/A | N/A | The shipping_cost |
| $price_points | ?integer | No | No | Null | N/A | N/A | The price in points (null: not set) |
| $one_per_member | BINARY | No | No | 0 | N/A | N/A | Whether it is restricted to one per member |
| $mail_subject | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Confirmation mail subject |
| $mail_body | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Confirmation mail body |
Returns
- The fields
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get fields for adding/editing one of these.
*
* @param Tempcode $hidden Hidden fields
* @param string $name_suffix What to place onto the end of the field name
* @param SHORT_TEXT $title Title
* @param LONG_TEXT $description Description
* @param URLPATH $image_url Image URL
* @param BINARY $enabled Whether it is enabled
* @param ?REAL $price The price (null: not set)
* @param ID_TEXT $tax_code The tax code
* @param REAL $shipping_cost The shipping_cost
* @param ?integer $price_points The price in points (null: not set)
* @param BINARY $one_per_member Whether it is restricted to one per member
* @param SHORT_TEXT $mail_subject Confirmation mail subject
* @param LONG_TEXT $mail_body Confirmation mail body
* @return Tempcode The fields
*/
protected function _get_fields(object $hidden, string $name_suffix = '', string $title = '', string $description = '', string $image_url = '', int $enabled = 1, ?float $price = null, string $tax_code = '0%', float $shipping_cost = 0, ?int $price_points = null, int $one_per_member = 0, string $mail_subject = '', string $mail_body = '') : object
* Get fields for adding/editing one of these.
*
* @param Tempcode $hidden Hidden fields
* @param string $name_suffix What to place onto the end of the field name
* @param SHORT_TEXT $title Title
* @param LONG_TEXT $description Description
* @param URLPATH $image_url Image URL
* @param BINARY $enabled Whether it is enabled
* @param ?REAL $price The price (null: not set)
* @param ID_TEXT $tax_code The tax code
* @param REAL $shipping_cost The shipping_cost
* @param ?integer $price_points The price in points (null: not set)
* @param BINARY $one_per_member Whether it is restricted to one per member
* @param SHORT_TEXT $mail_subject Confirmation mail subject
* @param LONG_TEXT $mail_body Confirmation mail body
* @return Tempcode The fields
*/
protected function _get_fields(object $hidden, string $name_suffix = '', string $title = '', string $description = '', string $image_url = '', int $enabled = 1, ?float $price = null, string $tax_code = '0%', float $shipping_cost = 0, ?int $price_points = null, int $one_per_member = 0, string $mail_subject = '', string $mail_body = '') : object

