/home
/deploy
/EHungry-2-joel
/Web
/eds
/ordering
/restaurant.php
echo date('g:iA', $hoursInfos['earliestOpen2']) . ' - ' . date('g:iA', $hoursInfos['latestClose2']);
} else {
echo date('g:iA', $earliestOpen) . ' - ' . date('g:iA', $hoursInfos['latestClose']);
}
} elseif (!$isOpen && $showHoursIfClosed) {
if ($orderingClosedUntil === 'Indefinitely') {
echo 'Ordering disabled';
} else {
$opensLaterThanAWeek = strtotime('- 6 days', $nextOpenTime) > time();
$nextOpenDay = !$opensLaterThanAWeek? date('l ', $nextOpenTime) : '';
$nextOpenDate = $opensLaterThanAWeek? date('F jS ', $nextOpenTime) : '';
$nextOpenDayOrDate = $opensSoon ? '' : $nextOpenDay.$nextOpenDate;
echo('Opens ' . $nextOpenDayOrDate . 'at ' . date('g:iA', $nextOpenTime));
}
}
return ob_get_clean();
}
public static function storeInfo($attrs, \Restaurant $restaurant) {
ob_start();
?>
<? if (isSpringroll()) { ?>
<? $store_info_modal_id = 'store-info-modal'; ?>
<?=Button(
array_merge([
'variant' => 'outline-secondary',
'size' => 'small',
'data-bs-toggle' => 'modal',
'data-bs-target' => "#$store_info_modal_id",
'data-async-on-click' => true,
'data-async-method' => 'get',
'data-async-action' => "/restaurant-info/$restaurant->id",
'data-async-target' => "#$store_info_modal_id ." . DialogConstants::BODY_CLASS,
], omit($attrs, ['style'])),
Icon(['icon' => 'info-circle']) . ' Store info'
)?>
<?=Dialog([
Arguments
"Argument 2 passed to EDS\Restaurant::storeInfo() must be an instance of Restaurant, string given, called in /home/deploy/EHungry-2-joel/Web/templates4.0/customer/header.php on line 516"
/home
/deploy
/EHungry-2-joel
/Web
/templates4.0
/customer
/header.php
<div class="p-3">
<div class="pb-1">
<h1 role="heading" aria-level="2" class="eds-display-text-title-s m-0 p-0"><?=$restaurant->getDisplayName()?></h1>
<? if (isSpringroll()) { ?>
<p class="eds-copy-text-m-regular m-0">
<?=$restaurant->getFullAddress(false)?>
</p>
<? } ?>
</div>
<div class="d-sm-flex align-items-baseline">
<? if (!is_object($_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']) || !$_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign'] || !$_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']->getValue()) { ?>
<div class="mt-2">
<?=\EDS\Restaurant::openStatus([], $cart, $restaurant, !isSpringroll(), true, isSpringroll())?>
</div>
<? } ?>
<div class="d-flex gap-2 ms-sm-auto mt-2">
<? if (!is_object($_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']) || !$_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']->getValue()) { ?>
<?=\EDS\Restaurant::storeInfo(['class' => 'col text-nowrap'], 'Store info', $restaurant)?>
<? } ?>
<? if (!isSpringroll() && $account && isCMO($account)) { ?>
<?=\EDS\Restaurant::phone(['class' => 'col d-lg-none text-nowrap'], 'Call us', $restaurant)?>
<? } ?>
<? if (\RAHCampaign::isActiveForRestaurant($restaurant)) { ?>
<?=\RAHCampaign::badge(true)?>
<? } ?>
</div>
</div>
</div>
<? } ?>
</section>
</div>
<? } ?>
<? // Announcement banner ?>
<? if ($_REQUEST['form'] != 'home' && $account && $account->hasVisibleAnnouncement("banner")) { ?>
<? if (!isset($_SESSION['announcement_text']) || $_SESSION['announcement_text'] != $account->getContextualAnnouncementsHtml()) { ?>
Arguments
array:1 [
"class" => "col text-nowrap"
]
"Store info"
Restaurant {}
/home
/deploy
/EHungry-2-joel
/Web
/controllers
/customer.php
}
if (!isset($cart) || !is_object($cart)) {
$GLOBALS['cart'] = \Cart::getCurrent();
}
//unset callback data in the event someone didn't hit the callback validation page
if (!in_array($_REQUEST['form'], ['checkout', 'nosuchpage', 'validatecallback', 'viewdeliveryzone'])) {
//TODO: probably need to add one more form here that is called ajax, callback seems to reset when it shouldnt
unset($_SESSION['validation_data']);
}
$locs = $account->getActiveRestaurants('position');
$tab = MainNavigationTab::getAllForAccount($account->getId());
include_once(CORE_PATH.'lib/helpers/customer3.0.php');
if (!in_array($_REQUEST['form'], $viewContentOnly)) {
App::debugbarTime('header');
include_once(getLayoutPartPath('header'));
App::debugbarTime('header');
}
App::debugbarTime("view '{$_REQUEST['form']}'");
$path = CORE_PATH.'view' . ($_REQUEST['_VERSION'] == 4 ? 4 : 3) . '.0/customer/'.$_REQUEST['form'].'.php';
if (is_readable($path)) {
include_once($path);
}
App::debugbarTime("view '{$_REQUEST['form']}'");
if (!in_array($_REQUEST['form'], $viewContentOnly)) {
App::debugbarTime('footer');
include_once(getLayoutPartPath('footer'));
App::debugbarTime('footer');
}
function getLayoutPartPath($part) {
if (isset($_REQUEST['_CORDOVA_APP'])) {
$cart = Cart::getCurrent();
Arguments
"/home/deploy/EHungry-2-joel/Web/templates4.0/customer/header.php"
/home
/deploy
/EHungry-2-joel
/Web
/index.php
App::startTime();
ErrorHandlers::register();
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");
Arguments
"/home/deploy/EHungry-2-joel/Web/controllers/customer.php"