Function __global->set_extra_request_metadata
Definitions
sources/global3.php
- Add some metadata for the request.It is taken by:a) Getting directly from the passed $metadata.b) Looking up the CMA hook for the given $content_type, and using that to dereference properties from $row.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $metadata | array | No | No | required parameter | N/A | N/A | Extra metadata |
| $row | ?array | No | No | Null | N/A | N/A | Content row to automatically grab data from, if we also have $content_type (null: unknown) |
| $content_type | ?ID_TEXT | No | No | Null | N/A | N/A | Content type (null: unknown) |
| $content_id | ?ID_TEXT | No | No | Null | N/A | N/A | Content ID, used for some cases of deeper probing (null: unknown) |
Preview
Code (PHP)
/**
* Add some metadata for the request.It is taken by:a) Getting directly from the passed $metadata.b) Looking up the CMA hook for the given $content_type, and using that to dereference properties from $row.
*
* @param array $metadata Extra metadata
* @param ?array $row Content row to automatically grab data from, if we also have $content_type (null: unknown)
* @param ?ID_TEXT $content_type Content type (null: unknown)
* @param ?ID_TEXT $content_id Content ID, used for some cases of deeper probing (null: unknown)
*/
function set_extra_request_metadata(array $metadata, ?array $row = null, ?string $content_type = null, ?string $content_id = null)
* Add some metadata for the request.It is taken by:a) Getting directly from the passed $metadata.b) Looking up the CMA hook for the given $content_type, and using that to dereference properties from $row.
*
* @param array $metadata Extra metadata
* @param ?array $row Content row to automatically grab data from, if we also have $content_type (null: unknown)
* @param ?ID_TEXT $content_type Content type (null: unknown)
* @param ?ID_TEXT $content_id Content ID, used for some cases of deeper probing (null: unknown)
*/
function set_extra_request_metadata(array $metadata, ?array $row = null, ?string $content_type = null, ?string $content_id = null)

