Function Hook_ecommerce_usergroup->get_needed_fields
Definitions
sources/hooks/systems/ecommerce/usergroup.php
- Get fields that need to be filled in in the purchasing module.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type_code | ID_TEXT | No | No | required parameter | N/A | N/A | The product codename |
| $from_admin | boolean | No | No | False | N/A | N/A | Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input. |
Returns
- A triple: The fields (use null for none), Hidden fields (use null for none), The text (use null for none), array of JavaScript function calls
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get fields that need to be filled in in the purchasing module.
*
* @param ID_TEXT $type_code The product codename
* @param boolean $from_admin Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input.
* @return array A triple: The fields (use null for none), Hidden fields (use null for none), The text (use null for none), array of JavaScript function calls
*/
public function get_needed_fields(string $type_code, bool $from_admin = false) : array
* Get fields that need to be filled in in the purchasing module.
*
* @param ID_TEXT $type_code The product codename
* @param boolean $from_admin Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input.
* @return array A triple: The fields (use null for none), Hidden fields (use null for none), The text (use null for none), array of JavaScript function calls
*/
public function get_needed_fields(string $type_code, bool $from_admin = false) : array

