Interface for content entity source field processors.
Expanded class hierarchy of FieldProcessorInterface
All classes that implement FieldProcessorInterface
interface FieldProcessorInterface {
/**
* Extracts the translatatable data structure from the given field.
*
* @param \Drupal\Core\Field\FieldItemListInterface $field
* The field object.
*
* @return array $data
* An array of elements where each element has the following keys:
* - #text
* - #translate
*
* @see \Drupal\tmgmt_content\Plugin\tmgmt\Source\ContentEntitySource::extractTranslatableData()
*/
public function extractTranslatableData(FieldItemListInterface $field);
/**
* Process the translated data for this field back into a structure that can be saved by the content entity.
*
* @param array $field_data
* The translated data for this field.
* @param \Drupal\Core\Field\FieldItemListInterface $field
* The field object.
*
* @see \Drupal\tmgmt_content\Plugin\tmgmt\Source\ContentEntitySource::doSaveTranslations()
*/
public function setTranslations($field_data, FieldItemListInterface $field);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldProcessorInterface:: |
public | function | Extracts the translatatable data structure from the given field. | 1 |
FieldProcessorInterface:: |
public | function | Process the translated data for this field back into a structure that can be saved by the content entity. | 1 |