You are here

function smartqueue_build_string in Nodequeue 6.2

Same name and namespace in other branches
  1. 5.2 smartqueue.module \smartqueue_build_string()
  2. 7.3 smartqueue.module \smartqueue_build_string()
  3. 7.2 modules/smartqueue/smartqueue.module \smartqueue_build_string()

Build an array of strings that represents all of the possible term combinations

1 call to smartqueue_build_string()
smartqueue_taxonomy_nodequeue_subqueues in ./smartqueue.module
Implementation of hook_nodequeue_subqueues()

File

./smartqueue.module, line 183

Code

function smartqueue_build_string($arrays) {
  $array = array_shift($arrays);
  $term = '';
  if (empty($arrays)) {
    return $array;
  }
  $substrings = smartqueue_build_string($arrays);
  $strings = array();
  foreach ($array as $term) {
    foreach ($substrings as $string) {
      $strings[] = "{$term}-{$string}";
    }
  }
  return $strings;
}