Skip to content

Instantly share code, notes, and snippets.

@fago
Created February 8, 2015 14:03
Show Gist options
  • Select an option

  • Save fago/2a4b5f050905f83bc7ab to your computer and use it in GitHub Desktop.

Select an option

Save fago/2a4b5f050905f83bc7ab to your computer and use it in GitHub Desktop.
storing rules components
$action = $this->expressionManager->createAction('rules_test_log');
<?php
$config_entity = $this->storage->create([
'id' => 'test_rule',
'expression_id' => 'rules_action',
'configuration' => $action->getConfiguration(),
]);
$config_entity->save();
// Create the Rules expression object from the configuration.
$expression = $loaded_entity->getExpression();
$expression->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment