Function Module_purchase->_check_can_afford
Definitions
site/pages/modules/purchase.php
- Check to see if the current user can afford a product.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
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 code |
Returns
- Error screen (null: no error)
- Type: ?Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check to see if the current user can afford a product.
*
* @param ID_TEXT $type_code The product code
* @return ?Tempcode Error screen (null: no error)
*/
protected function _check_can_afford(string $type_code) : ?object
* Check to see if the current user can afford a product.
*
* @param ID_TEXT $type_code The product code
* @return ?Tempcode Error screen (null: no error)
*/
protected function _check_can_afford(string $type_code) : ?object
