Function Module_cms_catalogues_cat->get_form_fields
Definitions
cms/pages/modules/cms_catalogues.php
- Get Tempcode for a catalogue category 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 |
|---|---|---|---|---|---|---|---|
| $catalogue_name | ?ID_TEXT | No | No | Null | N/A | N/A | The name of the catalogue the category is in (null: detect) |
| $title | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The title of the category |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Description for the category |
| $notes | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Admin notes |
| $parent_id | ?AUTO_LINK | No | No | -1 | N/A | N/A | The ID of the parent category (null: no parent) (-1: arbitrary default) |
| $id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of this category (null: we're adding, not editing) |
| $rep_image | URLPATH | No | No | Blank (empty string) | N/A | N/A | The rep-image for the catalogue category |
| $move_days_lower | integer | No | No | 30 | N/A | N/A | The number of days before expiry (lower limit) |
| $move_days_higher | integer | No | No | 60 | N/A | N/A | The number of days before expiry (higher limit) |
| $move_target | ?AUTO_LINK | No | No | Null | N/A | N/A | The expiry category (null: do not expire) |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for a catalogue category adding/editing form.
*
* @param ?ID_TEXT $catalogue_name The name of the catalogue the category is in (null: detect)
* @param SHORT_TEXT $title The title of the category
* @param LONG_TEXT $description Description for the category
* @param LONG_TEXT $notes Admin notes
* @param ?AUTO_LINK $parent_id The ID of the parent category (null: no parent) (-1: arbitrary default)
* @param ?AUTO_LINK $id The ID of this category (null: we're adding, not editing)
* @param URLPATH $rep_image The rep-image for the catalogue category
* @param integer $move_days_lower The number of days before expiry (lower limit)
* @param integer $move_days_higher The number of days before expiry (higher limit)
* @param ?AUTO_LINK $move_target The expiry category (null: do not expire)
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?string $catalogue_name = null, string $title = '', string $description = '', string $notes = '', ?int $parent_id = -1, ?int $id = null, string $rep_image = '', int $move_days_lower = 30, int $move_days_higher = 60, ?int $move_target = null) : array
* Get Tempcode for a catalogue category adding/editing form.
*
* @param ?ID_TEXT $catalogue_name The name of the catalogue the category is in (null: detect)
* @param SHORT_TEXT $title The title of the category
* @param LONG_TEXT $description Description for the category
* @param LONG_TEXT $notes Admin notes
* @param ?AUTO_LINK $parent_id The ID of the parent category (null: no parent) (-1: arbitrary default)
* @param ?AUTO_LINK $id The ID of this category (null: we're adding, not editing)
* @param URLPATH $rep_image The rep-image for the catalogue category
* @param integer $move_days_lower The number of days before expiry (lower limit)
* @param integer $move_days_higher The number of days before expiry (higher limit)
* @param ?AUTO_LINK $move_target The expiry category (null: do not expire)
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?string $catalogue_name = null, string $title = '', string $description = '', string $notes = '', ?int $parent_id = -1, ?int $id = null, string $rep_image = '', int $move_days_lower = 30, int $move_days_higher = 60, ?int $move_target = null) : array

