Fieldgroup::saveFieldContext()
Save the context of the given Field for this Fieldgroup
Available since version 3.0.263.
Example
// Make 'title' have label 'Headline' when used in blog fieldgroup
$fieldgroup = $fieldgroups->get('blog');
$field = $fieldgroup->getFieldContext('title');
$field->label = 'Headline';
$fieldgroup->saveFieldContext($field);Usage
// basic usage
$bool = $fieldgroup->saveFieldContext(Field $field);
// usage with all arguments
$bool = $fieldgroup->saveFieldContext(Field $field, string $namespace = '');Arguments
| Name | Type(s) | Description |
|---|---|---|
$field | Field | Field to save context for |
$namespace (optional) | string | An optional namespace for additional context |
Return value
boolTrue on success
Exceptions
Method can throw exceptions on error:
WireException- if given a Field that is not in context
Fieldgroup methods and properties
API reference based on ProcessWire core version 3.0.263