abstract class MappedFieldBase in Pardot Integration 2.x
Provides a class for mapped fields.
Hierarchy
- class \Drupal\pardot\MappedFieldBase implements MappedFieldInterface
Expanded class hierarchy of MappedFieldBase
File
- src/
MappedFieldBase.php, line 8
Namespace
Drupal\pardotView source
abstract class MappedFieldBase implements MappedFieldInterface {
/**
* The pardot field key to map the value to.
*
* @var string
*/
protected $pardotKey;
/**
* The plguin Type.
*
* @var string
*/
protected $pluginType;
/**
* The Plugin associated with this map.
*
* @var mixed
*/
protected $plugin;
/**
* {@inheritdoc}
*/
public function __construct(string $pardot_key = '', $plugin_type = '', $plugin = [], $config = []) {
$this->pardotKey = $pardot_key;
$this->pluginType = $plugin_type;
$this->plugin = $plugin;
}
/**
* {@inheritdoc}
*/
public function getPardotKey() {
return $this->pardotKey;
}
/**
* {@inheritdoc}
*/
public function setPardotKey($pardot_key) {
$this->pardotKey = $pardot_key;
return $this;
}
/**
* {@inheritdoc}
*/
public function getPluginType() {
return $this->pluginType;
}
/**
* {@inheritdoc}
*/
public function setPluginType(string $plugin_type) {
$this->pluginType = $plugin_type;
return $this;
}
/**
* {@inheritdoc}
*/
public function getPlugin() {
return $this->plugin;
}
/**
* {@inheritdoc}
*/
public function setPlugin($plugin) {
$this->plugin = $plugin;
return $this;
}
/**
* {@inheritdoc}
*/
public function toArray() {
return [
'pardot_key' => $this
->getPardotKey(),
'plugin_type' => $this
->getPluginType(),
'plugin' => $this
->getPlugin(),
'class' => get_called_class(),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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 |
Set the machine name of the plugin_type chosen. Overrides MappedFieldInterface:: |
1 |
MappedFieldBase:: |
public | function |
Returns an array representation of the segment. Overrides MappedFieldInterface:: |
|
MappedFieldBase:: |
public | function |
Constructs a new MappedField. Overrides MappedFieldInterface:: |
1 |