You are here

public function UserVariable::processSettings in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Plugin/BusinessRulesVariable/UserVariable.php \Drupal\business_rules\Plugin\BusinessRulesVariable\UserVariable::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/BusinessRulesVariable/UserVariable.php, line 110

Class

UserVariable
A variable representing one user account.

Namespace

Drupal\business_rules\Plugin\BusinessRulesVariable

Code

public function processSettings(array $settings, ItemInterface $item) {
  if ($settings['current_or_defined'] == 'current') {
    unset($settings['user_id']);
  }
  return $settings;
}