Function Module_cms_downloads_cat->get_form_fields
Definitions
cms/pages/modules/cms_downloads.php
- Get Tempcode for a download 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 |
|---|---|---|---|---|---|---|---|
| $id | ?AUTO_LINK | No | No | Null | N/A | N/A | The download ID (null: new) |
| $category | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The name of the download category |
| $parent_id | ?AUTO_LINK | No | No | Null | N/A | N/A | The download category parent (null: use root) |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Description |
| $notes | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Notes |
| $category_id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of the download category (null: we're adding, not editing) |
| $rep_image | URLPATH | No | No | Blank (empty string) | N/A | N/A | The rep-image for the download category |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for a download category adding/editing form.
*
* @param ?AUTO_LINK $id The download ID (null: new)
* @param SHORT_TEXT $category The name of the download category
* @param ?AUTO_LINK $parent_id The download category parent (null: use root)
* @param LONG_TEXT $description Description
* @param LONG_TEXT $notes Notes
* @param ?AUTO_LINK $category_id The ID of the download category (null: we're adding, not editing)
* @param URLPATH $rep_image The rep-image for the download category
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?int $id = null, string $category = '', ?int $parent_id = null, string $description = '', string $notes = '', ?int $category_id = null, string $rep_image = '') : array
* Get Tempcode for a download category adding/editing form.
*
* @param ?AUTO_LINK $id The download ID (null: new)
* @param SHORT_TEXT $category The name of the download category
* @param ?AUTO_LINK $parent_id The download category parent (null: use root)
* @param LONG_TEXT $description Description
* @param LONG_TEXT $notes Notes
* @param ?AUTO_LINK $category_id The ID of the download category (null: we're adding, not editing)
* @param URLPATH $rep_image The rep-image for the download category
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?int $id = null, string $category = '', ?int $parent_id = null, string $description = '', string $notes = '', ?int $category_id = null, string $rep_image = '') : array

