You are here

function recipe_get_ingredient_alpha_list in Recipe 6

1 call to recipe_get_ingredient_alpha_list()
recipe_ingredient_index_page in ./recipe_ingredient_index.inc
@file recipe_ingredient_index.inc - This is an include file containing most all of the recipe category index page functionality.

File

./recipe_ingredient_index.inc, line 143
recipe_ingredient_index.inc - This is an include file containing most all of the recipe category index page functionality.

Code

function recipe_get_ingredient_alpha_list(&$ingredient_list = NULL) {
  $alpha_list = array();
  foreach ($ingredient_list as $i) {
    $letter = strtolower(drupal_substr($i->name, 0, 1));
    $i->letter = $letter;
    $alpha_list[$letter] = 1;
  }
  return $alpha_list;
}