class MappedEmailField in Pardot Integration 2.x
Provides a class for mapped fields.
Hierarchy
- class \Drupal\pardot\MappedFieldBase implements MappedFieldInterface
- class \Drupal\pardot\MappedEmailField
Expanded class hierarchy of MappedEmailField
1 file declares its use of MappedEmailField
- pardot.module in ./
pardot.module - Contains pardot.module.
File
- src/
MappedEmailField.php, line 8
Namespace
Drupal\pardotView source
class MappedEmailField extends MappedFieldBase {
/**
* {@inheritdoc}
*/
public function __construct(string $pardot_key = '', string $plugin_type = 'default_value', $plugin = [], $config = []) {
$this->pardotKey = $pardot_key;
$this->pluginType = $plugin_type;
if (!$plugin) {
$plugin = \Drupal::service('plugin.manager.pardot_form_map_formatter_plugin')
->createInstance($this->pluginType);
}
if ($plugin) {
$config += $plugin
->getConfiguration();
$config['allowed_field_types'] = [
'email',
];
$plugin
->setConfiguration($config);
}
$this->plugin = $plugin;
}
/**
* {@inheritdoc}
*/
public function setPluginType(string $plugin_type) {
// We don't want this to change.
// $this->pluginType = $plugin_type.
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MappedEmailField:: |
public | function |
Set the machine name of the plugin_type chosen. Overrides MappedFieldBase:: |
|
MappedEmailField:: |
public | function |
Constructs a new MappedField. Overrides MappedFieldBase:: |
|
MappedFieldBase:: |
protected | property | The pardot field key to map the value to. | |
MappedFieldBase:: |
protected | property | The Plugin associated with this map. | |
MappedFieldBase:: |
protected | property | The plguin Type. | |
MappedFieldBase:: |
public | function |
Get the pardot key string. Overrides MappedFieldInterface:: |
|
MappedFieldBase:: |
public | function |
Return the plugin instance or null. Overrides MappedFieldInterface:: |
|
MappedFieldBase:: |
public | function |
Get the machine name of the option chosen for the plugin type. Overrides MappedFieldInterface:: |
|
MappedFieldBase:: |
public | function |
Set the string for the pardot key. Overrides MappedFieldInterface:: |
|
MappedFieldBase:: |
public | function |
Set the instance of the plugin for this MappedField. Overrides MappedFieldInterface:: |
|
MappedFieldBase:: |
public | function |
Returns an array representation of the segment. Overrides MappedFieldInterface:: |