public function GroupHasUserCondition::processSettings in Business Rules 8
Same name and namespace in other branches
- 2.x modules/br_group/src/Plugin/BusinessRulesCondition/GroupHasUserCondition.php \Drupal\br_group\Plugin\BusinessRulesCondition\GroupHasUserCondition::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/ BusinessRulesCondition/ GroupHasUserCondition.php, line 97
Class
- GroupHasUserCondition
- Class GroupHasUserCondition.
Namespace
Drupal\br_group\Plugin\BusinessRulesConditionCode
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);
}