Skip to content

Instantly share code, notes, and snippets.

@Danisan
Created February 5, 2014 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Danisan/8818627 to your computer and use it in GitHub Desktop.
Save Danisan/8818627 to your computer and use it in GitHub Desktop.
function getProducts(){
static $products = null;
if(!$products){
$app_mod = BeanFactory::getBean('Products');
$list = $app_mod->get_full_list("", "1");
foreach($list as $item){
$products[$item->id] = $item->name;
}
return $products;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment