You are here

function rb_numbers_action_multiply in Rules Bonus Pack 6

Action for 'rb_numbers_action_multiply'.

File

./rb_numbers.module, line 136
Functions for extending number management with Rules.

Code

function rb_numbers_action_multiply($settings) {
  $factors = explode("\n", $settings['factors']);
  $product = 1;
  foreach ($factors as $factor) {
    $product = $product * $factor;
  }
  return array(
    'product' => $product,
  );
}