Function __global->metadata_get_fields
Definitions
sources/content2.php
- Get template fields to insert into a form page, for manipulation of metadata.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $content_type | ID_TEXT | No | No | required parameter | N/A | N/A | The type of resource (e.g. download) |
| $content_id | ?ID_TEXT | No | No | required parameter | N/A | N/A | The ID of the resource (null: adding) |
| $require_owner | boolean | No | No | True | N/A | N/A | Whether to require owner to be filled in |
| $fields_to_skip | array | No | No | [] | N/A | N/A | List of fields to NOT take in |
| $show_header | integer | No | No | 1 | N/A | N/A | Whether to show a header (a METADATA_HEADER_* constant) |
Returns
- Form page Tempcode fragment
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get template fields to insert into a form page, for manipulation of metadata.
*
* @param ID_TEXT $content_type The type of resource (e.g. download)
* @param ?ID_TEXT $content_id The ID of the resource (null: adding)
* @param boolean $require_owner Whether to require owner to be filled in
* @param array $fields_to_skip List of fields to NOT take in
* @param integer $show_header Whether to show a header (a METADATA_HEADER_* constant)
* @return Tempcode Form page Tempcode fragment
*/
function metadata_get_fields(string $content_type, ?string $content_id, bool $require_owner = true, array $fields_to_skip = [], int $show_header = 1) : object
* Get template fields to insert into a form page, for manipulation of metadata.
*
* @param ID_TEXT $content_type The type of resource (e.g. download)
* @param ?ID_TEXT $content_id The ID of the resource (null: adding)
* @param boolean $require_owner Whether to require owner to be filled in
* @param array $fields_to_skip List of fields to NOT take in
* @param integer $show_header Whether to show a header (a METADATA_HEADER_* constant)
* @return Tempcode Form page Tempcode fragment
*/
function metadata_get_fields(string $content_type, ?string $content_id, bool $require_owner = true, array $fields_to_skip = [], int $show_header = 1) : object

