interface FieldMappingInterface in Webform Content Creator 3.x
Interface for the field mapping.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\webform_content_creator\Plugin\FieldMappingInterface
Expanded class hierarchy of FieldMappingInterface
All classes that implement FieldMappingInterface
4 files declare their use of FieldMappingInterface
- EntityReferenceFieldMapping.php in src/
Plugin/ WebformContentCreator/ FieldMapping/ EntityReferenceFieldMapping.php - NumericFieldMapping.php in src/
Plugin/ WebformContentCreator/ FieldMapping/ NumericFieldMapping.php - SocialMediaLinksFieldMapping.php in src/
Plugin/ WebformContentCreator/ FieldMapping/ SocialMediaLinksFieldMapping.php - TextFieldMapping.php in src/
Plugin/ WebformContentCreator/ FieldMapping/ TextFieldMapping.php
File
- src/
Plugin/ FieldMappingInterface.php, line 13
Namespace
Drupal\webform_content_creator\PluginView source
interface FieldMappingInterface extends PluginInspectionInterface {
const WEBFORM_OPTIONS_ELEMENTS = [
"checkboxes",
"webform_checkboxes_other",
"webform_likert",
"radios",
"webform_radios_other",
"select",
"webform_select_other",
"tableselect",
"webform_tableselect_sort",
"webform_table_sort",
];
const WEBFORM_ENTIY_REFERENCE_ELEMENTS = [
"entity_autocomplete",
"webform_entity_checkboxes",
"webform_entity_radios",
"webform_entity_select",
"webform_term_checkboxes",
"webform_term_select",
];
const WEBFORM_TEXT_ELEMENTS = [
"textarea",
"textfield",
"hidden",
];
/**
* Returns whether the mapper supports custom field text
*
* @return bool
*/
public function supportsCustomFields();
/**
* Returns the entity component fields.
*
* @return array
* returns an array of the component fields that makeup this field
*/
public function getEntityComponentFields(FieldDefinitionInterface $field_definition);
/**
* @param $webform_id
*
* @return mixed
*/
public function getSupportedWebformFields($webform_id);
/**
* Use a single mapping to set an entity field value.
*
* @param \Drupal\Core\Entity\ContentEntityInterface &$content
* Content being mapped with a webform submission.
* @param array $webform_element
* Webform element
* @param array $data
* Webform submission data.
* @param FieldDefinitionInterface $field_definition
* Entity field defintition.
*
* @return \Drupal\Core\Entity\ContentEntityInterface
* Created content item.
*/
public function mapEntityField(ContentEntityInterface &$content, array $webform_element, array $data = [], FieldDefinitionInterface $field_definition);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldMappingInterface:: |
public | function | Returns the entity component fields. | 1 |
FieldMappingInterface:: |
public | function | 1 | |
FieldMappingInterface:: |
public | function | Use a single mapping to set an entity field value. | 1 |
FieldMappingInterface:: |
public | function | Returns whether the mapper supports custom field text | 1 |
FieldMappingInterface:: |
constant | |||
FieldMappingInterface:: |
constant | |||
FieldMappingInterface:: |
constant | |||
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |