Function Module_cms_galleries_cat->get_form_fields
Definitions
cms/pages/modules/cms_galleries.php
- Get Tempcode for a gallery 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 |
|---|---|---|---|---|---|---|---|
| $name | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | The gallery codename (blank: new) |
| $fullname | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The full human-readable name of the gallery |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | The description of the gallery |
| $notes | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Hidden notes associated with the gallery |
| $parent_id | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | The parent gallery (blank: no parent) |
| $accept_images | ?BINARY | No | No | Null | N/A | N/A | Whether images may be put in this gallery (null: work out statistically) |
| $accept_videos | ?BINARY | No | No | Null | N/A | N/A | Whether videos may be put in this gallery (null: work out statistically) |
| $is_member_synched | BINARY | No | No | 0 | N/A | N/A | Whether the gallery serves as a container for automatically created member galleries |
| $layout_mode | ?ID_TEXT | No | No | Null | N/A | N/A | Whether the gallery uses the grid, carousel or mosaic layout mode (null: pick statistically based on current usage of other galleries) |
| $rep_image | ?URLPATH | No | No | Null | N/A | N/A | The representative image of the gallery (null: none) |
| $watermark_top_left | ?URLPATH | No | No | Null | N/A | N/A | Watermark (null: none) |
| $watermark_top_right | ?URLPATH | No | No | Null | N/A | N/A | Watermark (null: none) |
| $watermark_bottom_left | ?URLPATH | No | No | Null | N/A | N/A | Watermark (null: none) |
| $watermark_bottom_right | ?URLPATH | No | No | Null | N/A | N/A | Watermark (null: none) |
| $allow_rating | ?BINARY | No | No | Null | N/A | N/A | Whether rating is allowed (null: decide statistically, based on existing choices) |
| $allow_comments | ?SHORT_INTEGER | No | No | Null | N/A | N/A | Whether comments are allowed (0=no, 1=yes, 2=review style) (null: decide statistically, based on existing choices) |
| $gallery_sort | ?SHORT_TEXT | No | No | Null | N/A | N/A | The sort order for sub-galleries (null: use site default) |
| $media_sort | ?SHORT_TEXT | No | No | Null | N/A | N/A | The sort order for media within the gallery (null: use site default) |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for a gallery adding/editing form.
*
* @param ID_TEXT $name The gallery codename (blank: new)
* @param SHORT_TEXT $fullname The full human-readable name of the gallery
* @param LONG_TEXT $description The description of the gallery
* @param LONG_TEXT $notes Hidden notes associated with the gallery
* @param ID_TEXT $parent_id The parent gallery (blank: no parent)
* @param ?BINARY $accept_images Whether images may be put in this gallery (null: work out statistically)
* @param ?BINARY $accept_videos Whether videos may be put in this gallery (null: work out statistically)
* @param BINARY $is_member_synched Whether the gallery serves as a container for automatically created member galleries
* @param ?ID_TEXT $layout_mode Whether the gallery uses the grid, carousel or mosaic layout mode (null: pick statistically based on current usage of other galleries)
* @param ?URLPATH $rep_image The representative image of the gallery (null: none)
* @param ?URLPATH $watermark_top_left Watermark (null: none)
* @param ?URLPATH $watermark_top_right Watermark (null: none)
* @param ?URLPATH $watermark_bottom_left Watermark (null: none)
* @param ?URLPATH $watermark_bottom_right Watermark (null: none)
* @param ?BINARY $allow_rating Whether rating is allowed (null: decide statistically, based on existing choices)
* @param ?SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style) (null: decide statistically, based on existing choices)
* @param ?SHORT_TEXT $gallery_sort The sort order for sub-galleries (null: use site default)
* @param ?SHORT_TEXT $media_sort The sort order for media within the gallery (null: use site default)
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(string $name = '', string $fullname = '', string $description = '', string $notes = '', string $parent_id = '', ?int $accept_images = null, ?int $accept_videos = null, int $is_member_synched = 0, ?string $layout_mode = null, ?string $rep_image = null, ?string $watermark_top_left = null, ?string $watermark_top_right = null, ?string $watermark_bottom_left = null, ?string $watermark_bottom_right = null, ?int $allow_rating = null, ?int $allow_comments = null, ?string $gallery_sort = null, ?string $media_sort = null) : array
* Get Tempcode for a gallery adding/editing form.
*
* @param ID_TEXT $name The gallery codename (blank: new)
* @param SHORT_TEXT $fullname The full human-readable name of the gallery
* @param LONG_TEXT $description The description of the gallery
* @param LONG_TEXT $notes Hidden notes associated with the gallery
* @param ID_TEXT $parent_id The parent gallery (blank: no parent)
* @param ?BINARY $accept_images Whether images may be put in this gallery (null: work out statistically)
* @param ?BINARY $accept_videos Whether videos may be put in this gallery (null: work out statistically)
* @param BINARY $is_member_synched Whether the gallery serves as a container for automatically created member galleries
* @param ?ID_TEXT $layout_mode Whether the gallery uses the grid, carousel or mosaic layout mode (null: pick statistically based on current usage of other galleries)
* @param ?URLPATH $rep_image The representative image of the gallery (null: none)
* @param ?URLPATH $watermark_top_left Watermark (null: none)
* @param ?URLPATH $watermark_top_right Watermark (null: none)
* @param ?URLPATH $watermark_bottom_left Watermark (null: none)
* @param ?URLPATH $watermark_bottom_right Watermark (null: none)
* @param ?BINARY $allow_rating Whether rating is allowed (null: decide statistically, based on existing choices)
* @param ?SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style) (null: decide statistically, based on existing choices)
* @param ?SHORT_TEXT $gallery_sort The sort order for sub-galleries (null: use site default)
* @param ?SHORT_TEXT $media_sort The sort order for media within the gallery (null: use site default)
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(string $name = '', string $fullname = '', string $description = '', string $notes = '', string $parent_id = '', ?int $accept_images = null, ?int $accept_videos = null, int $is_member_synched = 0, ?string $layout_mode = null, ?string $rep_image = null, ?string $watermark_top_left = null, ?string $watermark_top_right = null, ?string $watermark_bottom_left = null, ?string $watermark_bottom_right = null, ?int $allow_rating = null, ?int $allow_comments = null, ?string $gallery_sort = null, ?string $media_sort = null) : array

