You are here

function finder_get_args in Finder 7.2

Convert finder arguments text field entry to an array of arguments.

Parameters

$string: The typed string of arguments, can include PHP code.

$variables: Any variables that should be available to any PHP provided in the input.

Return value

The array of views arguments.

2 calls to finder_get_args()
finder::arguments in includes/finder.inc
Finder arguments.
finder::element_arguments in includes/finder.inc
Finder element arguments.

File

includes/build.inc, line 56
The finder build functions.

Code

function finder_get_args($string, $variables) {
  $args = array();
  $arguments = finder_eval($string, $variables);
  if ($arguments) {
    $args = explode('/', $arguments);
    foreach ($args as $k => $v) {
      $args[$k] = trim($v);
    }
  }
  return $args;
}