Set meta data (custom fields for comments)
To set multiple properties at once specify an associative array for $key and omit $value.
Available since version 3.0.203.
Usage
// basic usage
$self = $comment->setMeta($key);
// usage with all arguments
$self = $comment->setMeta($key, $value = null);
Arguments
Name | Type(s) | Description |
---|---|---|
key | string, array | Property name to set or assoc array of them |
value (optional) | null, string, array, int, float, mixed | Value to set for $key or omit of you used an array. |
Return value
self
Comment methods and properties
API reference based on ProcessWire core version 3.0.236