public function LoopThroughFieldVariable::processSettings in Business Rules 2.x
Same name and namespace in other branches
- 8 src/Plugin/BusinessRulesAction/LoopThroughFieldVariable.php \Drupal\business_rules\Plugin\BusinessRulesAction\LoopThroughFieldVariable::processSettings()
Process the item settings before it's saved.
Parameters
array $settings: The settings to be processed before save the Business Rule Item.
\Drupal\business_rules\ItemInterface $item: The item being processed.
Return value
array The processed settings.
Overrides BusinessRulesItemPluginBase::processSettings
File
- src/
Plugin/ BusinessRulesAction/ LoopThroughFieldVariable.php, line 306
Class
- LoopThroughFieldVariable
- Class LoopThroughFieldVariable.
Namespace
Drupal\business_rules\Plugin\BusinessRulesActionCode
public function processSettings(array $settings, ItemInterface $item) {
if (empty($settings['items'])) {
$settings['items'] = [];
}
else {
foreach ($settings['items'] as $key => $item) {
$settings['items'][$key]['id'] = $key;
}
}
return $settings;
}