Skip to content

Instantly share code, notes, and snippets.

@Danisan

Danisan/get_list

Created Feb 5, 2014
Embed
What would you like to do?
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