You are here

function finder_views_get_args in Finder 6

Same name and namespace in other branches
  1. 7 modules/finder_views/finder_views.module \finder_views_get_args()

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

Parameters

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

$delimiter: The string by which arguments in $string are delimited.

$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_views_get_args()
finder_views_get_element_args in modules/finder_views/finder_views.module
Get element arguments.
finder_views_get_finder_args in modules/finder_views/finder_views.module
Get finder arguments.

File

modules/finder_views/finder_views.module, line 690
The finder views module.

Code

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