public function WebformElements::getPluginDefinition in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_webform/src/Plugin/SalesforceMappingField/WebformElements.php \Drupal\salesforce_webform\Plugin\SalesforceMappingField\WebformElements::getPluginDefinition()
Gets the definition of the plugin implementation.
Return value
array The plugin definition, as returned by the discovery object used by the plugin manager.
Overrides PluginBase::getPluginDefinition
1 call to WebformElements::getPluginDefinition()
- WebformElements::checkFieldMappingDependency in modules/
salesforce_webform/ src/ Plugin/ SalesforceMappingField/ WebformElements.php - On dependency removal, determine if this plugin needs to be removed.
File
- modules/
salesforce_webform/ src/ Plugin/ SalesforceMappingField/ WebformElements.php, line 97
Class
- WebformElements
- Adapter for Webform elements.
Namespace
Drupal\salesforce_webform\Plugin\SalesforceMappingFieldCode
public function getPluginDefinition() {
$definition = parent::getPluginDefinition();
$element_parts = explode('__', $this
->config('drupal_field_value'));
$main_element_name = reset($element_parts);
$webform = $this->entityTypeManager
->getStorage('webform')
->load($this->mapping
->get('drupal_bundle'));
// Unfortunately, the best we can do for webform dependencies is a single
// dependency on the top-level webform, which is itself a monolithic config.
// @TODO implement webform-element-changed hook, if that exists.
$definition['config_dependencies']['config'][] = $webform
->getConfigDependencyName();
return $definition;
}