You are here

public function ViewsRulesLoop::rowVariables in Views Rules 7

3 calls to ViewsRulesLoop::rowVariables()
ViewsRulesLoop::evaluateRow in rules/views_rules.plugin.inc
Evaluates a view row in the loop.
ViewsRulesLoop::exportSettings in rules/views_rules.plugin.inc
ViewsRulesLoop::stateVariables in rules/views_rules.plugin.inc
Returns available state variables for an element.

File

rules/views_rules.plugin.inc, line 123
Views Rules plugin implementations.

Class

ViewsRulesLoop
Loop plugin for using results from a view with Rules displays.

Code

public function rowVariables() {
  if ($iterator = $this
    ->getViewIterator()) {
    $variables = array();
    foreach ($iterator
      ->get_rules_variable_info() as $name => $info) {
      if (isset($this->settings[$name . ':var'])) {
        $variables[$this->settings[$name . ':var']] = array(
          'source name' => $name,
          'type' => $info['type'],
          'label' => $this->settings[$name . ':label'],
        );
      }
    }
    return $variables;
  }

  // Return no variable.
  return array();
}