public function RemoveUserFromGroupAction::processSettings in Business Rules 8
Same name and namespace in other branches
- 2.x modules/br_group/src/Plugin/BusinessRulesAction/RemoveUserFromGroupAction.php \Drupal\br_group\Plugin\BusinessRulesAction\RemoveUserFromGroupAction::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
- modules/
br_group/ src/ Plugin/ BusinessRulesAction/ RemoveUserFromGroupAction.php, line 97
Class
- RemoveUserFromGroupAction
- Class RemoveUserFromGroupAction.
Namespace
Drupal\br_group\Plugin\BusinessRulesActionCode
public function processSettings(array $settings, ItemInterface $item) {
if ($settings['user_key'] == 'username') {
$settings['user_id'] = NULL;
}
elseif ($settings['user_key'] == 'userid') {
$settings['user_name'] = NULL;
}
return parent::processSettings($settings, $item);
}