You are here

public function RulesUiConfigHandler::updateComponent in Rules 8.3

Updates the edited component.

Parameters

\Drupal\rules\Engine\RulesComponent $component: The updated, edited component.

Overrides RulesUiHandlerInterface::updateComponent

File

src/Ui/RulesUiConfigHandler.php, line 125

Class

RulesUiConfigHandler
The default handler for RulesUi plugins that store to config.

Namespace

Drupal\rules\Ui

Code

public function updateComponent(RulesComponent $component) {
  $config = $this
    ->getConfig();
  if ($config instanceof RulesUiComponentProviderInterface) {
    $config
      ->updateFromComponent($component);
  }
  else {
    $config
      ->set($this->pluginDefinition->settings['config_key'], $component
      ->getConfiguration());
  }
  $this
    ->storeToTempStore($config);
}