Created
February 8, 2015 14:03
-
-
Save fago/2a4b5f050905f83bc7ab to your computer and use it in GitHub Desktop.
storing rules components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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