\UntranslatableFieldsExtension
Synopsis
class UntranslatableFieldsExtension
extends DataExtension
{
- // constants
- const fields = false;
- const invert = false;
- const add_classes_to_cms = false;
- const add_attributes_to_cms = false;
- // methods
- public void onAfterWrite()
- public array getUntranslatableFields()
- public void updateCMSFields()
Hierarchy
Extends
- DataExtension
Constants
Name | Value |
---|---|
fields | false |
invert | false |
add_classes_to_cms | false |
add_attributes_to_cms | false |
Methods
public
- getUntranslatableFields() — Returns an array of string names of the fields of this object that are marked as 'untranslatable'. If invert mode is on, it will obviously still return the list of untranslatable fields - this time it won't list the fields declared in the YAML config, but instead all fields except the ones listed in YAML config - due to the invert mode. So basically it always tells what will be untranslated and can be used to debug if problems arise.
- onAfterWrite() — Untranslate all fields in a DataObject that are marked to be untranslatable.
- updateCMSFields()