Function __global->actual_metadata_get_fields
Definitions
sources/content2.php
- Get field values for metadata.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
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 old ID of the resource (null: adding) |
$fields_to_skip | array | No | No | [] | N/A | N/A | List of fields to NOT take in |
$new_content_id | ?ID_TEXT | No | No | Null | N/A | N/A | The new ID of the resource (null: not being renamed) |
Returns
- A map of standard metadata fields (name to value). If adding, this map is accurate for adding. If editing, nulls mean do-not-edit or non-editable.
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get field values for metadata.
*
* @param ID_TEXT $content_type The type of resource (e.g. download)
* @param ?ID_TEXT $content_id The old ID of the resource (null: adding)
* @param array $fields_to_skip List of fields to NOT take in
* @param ?ID_TEXT $new_content_id The new ID of the resource (null: not being renamed)
* @return array A map of standard metadata fields (name to value). If adding, this map is accurate for adding. If editing, nulls mean do-not-edit or non-editable.
*/
function actual_metadata_get_fields(string $content_type, ?string $content_id, array $fields_to_skip = [], ?string $new_content_id = null) : array
* Get field values for metadata.
*
* @param ID_TEXT $content_type The type of resource (e.g. download)
* @param ?ID_TEXT $content_id The old ID of the resource (null: adding)
* @param array $fields_to_skip List of fields to NOT take in
* @param ?ID_TEXT $new_content_id The new ID of the resource (null: not being renamed)
* @return array A map of standard metadata fields (name to value). If adding, this map is accurate for adding. If editing, nulls mean do-not-edit or non-editable.
*/
function actual_metadata_get_fields(string $content_type, ?string $content_id, array $fields_to_skip = [], ?string $new_content_id = null) : array