If you are looking into implementing a behavior for storage that is eventually field-based, then you are on the right page! Since it is quite likely that many behavior implementations will be field-based, we have walked an extra mile to facilitate this particular case.

First of all, there is synonyms_provider_field submodule that:

Apparently, on this page we will focus on the 2nd item from the list above. If you implement a behavior for a new field type, then:

Now let us see each of the steps in further details.

Implementing behavior interface

Look up in behavior cTools plugin definition of your interest what interface it declares. The cTools plugin must be of type behavior owned by synonyms module. The interface is declared under the interface property of the plugin definition. Read the documentation for that interface and write a PHP class that implements this interface for your particular field type. We cannot give more precise instructions about this step, because it all depends on the interface of the behavior.

Notifying synonyms_provider_field submodule about your new implementation

For the purposes of such notification we have the following hooks in synonyms_provider_field submodule:

Implementing either of the 2 hooks is highly straight forward, you will just inform the submodule about what field type is exposed to behavior implementation through what PHP class for a given behavior. Then the synonyms_provider_field submodule will analyze what fields are attached to what entity types and will convert this data into the format expected by the core Synonyms module. For more details, refer to synonyms_provider_field.api.php file.