本文整理匯總了PHP中ImageManager::allForMenu方法的典型用法代碼示例。如果您正苦於以下問題:PHP ImageManager::allForMenu方法的具體用法?PHP ImageManager::allForMenu怎麽用?PHP ImageManager::allForMenu使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ImageManager
的用法示例。
在下文中一共展示了ImageManager::allForMenu方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: menu
public function menu()
{
// TODO:
$cafeName = $this->f3->get('PARAMS.cafeName');
if (strtolower($cafeName) == 'richmond') {
$this->f3->set('isRichmond', 'active');
$cafeId = 1;
} else {
if (strtolower($cafeName) == 'malvern') {
$this->f3->set('isMalvern', 'active');
$cafeId = 2;
}
}
$this->f3->set('cafeId', $cafeId);
// create blur effect for background
$this->f3->set('isBlurred', 'blur');
// retrieve all pictures and return links to client
$images = new ImageManager($this->db);
$menuImages = $images->allForMenu();
// retrieve all categories and setup for template
$cats = new Category($this->db);
$categories = $cats->all();
$this->f3->set('categories', $categories);
$firstCategory = $categories[0]->categoryId;
$info = new Info($this->db);
$this->f3->set('isPriceOn', $info->all()[0]->isPriceOn);
// setup for client
$clientArray = array();
foreach ($menuImages as $menuImage) {
$clientArray[] = $menuImage->imageLink;
}
// retreive all items based on $cafeId
$items = new Item($this->db);
$this->f3->set('items', $items->getAllByCategoryId($cafeId, $firstCategory));
$this->f3->set('pictureArray', $clientArray);
$this->f3->set('ESCAPE', false);
$this->f3->set('view', 'user/menu.html');
}