You are here

function rules_action_node_set_title in Rules 7.2

An action making use of named parameters.

1 string reference to 'rules_action_node_set_title'
RulesTestCase::testNamedParameters in tests/rules.test
Tests the named parameter mode.

File

tests/rules_test.test.inc, line 61
Include file for testing file inclusion.

Code

function rules_action_node_set_title($arguments) {

  // Make sure the data is unwrapped.
  if ($arguments['node'] instanceof EntityMetadataWrapper) {
    throw new Exception('Argument has not been correctly unwrapped.');
  }
  $arguments['node']->title = $arguments['title'];
  return $arguments;
}