<section class="restaurant-detailed-banner">
<div class="text-center">
<?php if(substr($event['images'][1]['filename'],0,4)=="http") { ?>
<img class="img-fluid-events-detail cover blur" src="<?php echo $event['images'][1]['filename']; ?>">
<?php } else { ?>
<img class="img-fluid-events-detail cover blur" src="<?php echo $this->basePath().$event['images'][1]['filename']; ?>">
<?php } ?>
</div>
<div class="restaurant-detailed-header">
<div class="container">
<div class="row d-flex align-items-end mb-5">
<div class="owl-carousel owl-carousel-show owl-theme">
<div class="item">
<div class="col-md-12">
<img class="img-fluid max300" src="<?php echo $this->basePath().$event['images'][1]['filename']; ?>">
</div>
</div>
<?php
if($event['upgrades']!=null and isset($event['upgrades']['images'])) {
$counter=$event['upgrades']['images'];
$i=0;
for(;;) {
$currentImage=$i+2;
if(isset($event['images'][$currentImage])) {
?>
<div class="item">
<div class="col-md-12">
<img class="img-fluid max300" src="<?php echo $this->basePath().$event['images'][$currentImage]['filename']; ?>">
</div>
</div>
<?php
} else {
break;
}
$i++;
if($i==$counter) { break; }
}
} ?>
</div>
</div>
Arguments
"Undefined variable: event"
<section class="restaurant-detailed-banner">
<div class="text-center">
<?php if(substr($event['images'][1]['filename'],0,4)=="http") { ?>
<img class="img-fluid-events-detail cover blur" src="<?php echo $event['images'][1]['filename']; ?>">
<?php } else { ?>
<img class="img-fluid-events-detail cover blur" src="<?php echo $this->basePath().$event['images'][1]['filename']; ?>">
<?php } ?>
</div>
<div class="restaurant-detailed-header">
<div class="container">
<div class="row d-flex align-items-end mb-5">
<div class="owl-carousel owl-carousel-show owl-theme">
<div class="item">
<div class="col-md-12">
<img class="img-fluid max300" src="<?php echo $this->basePath().$event['images'][1]['filename']; ?>">
</div>
</div>
<?php
if($event['upgrades']!=null and isset($event['upgrades']['images'])) {
$counter=$event['upgrades']['images'];
$i=0;
for(;;) {
$currentImage=$i+2;
if(isset($event['images'][$currentImage])) {
?>
<div class="item">
<div class="col-md-12">
<img class="img-fluid max300" src="<?php echo $this->basePath().$event['images'][$currentImage]['filename']; ?>">
</div>
</div>
<?php
} else {
break;
}
$i++;
if($i==$counter) { break; }
}
} ?>
</div>
</div>
$__vars = $this->vars()->getArrayCopy();
if (array_key_exists('this', $__vars)) {
unset($__vars['this']);
}
extract($__vars);
unset($__vars); // remove $__vars from local scope
$this->__content = '';
while ($this->__template = array_pop($this->__templates)) {
$this->__file = $this->resolver($this->__template);
if (! $this->__file) {
throw new Exception\RuntimeException(sprintf(
'%s: Unable to render template "%s"; resolver could not resolve to a file',
__METHOD__,
$this->__template
));
}
try {
ob_start();
$includeReturn = include $this->__file;
$this->__content = ob_get_clean();
} catch (\Throwable $ex) {
ob_end_clean();
throw $ex;
} catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced
ob_end_clean();
throw $ex;
}
if ($includeReturn === false && empty($this->__content)) {
throw new Exception\UnexpectedValueException(sprintf(
'%s: Unable to render template "%s"; file include failed',
__METHOD__,
$this->__file
));
}
}
$this->setVars(array_pop($this->__varsCache));
if ($this->__filterChain instanceof FilterChain) {
Arguments
"/var/www/vhosts/kukdama.de/httpdocs/module/Base/view/base/events/show.phtml"
// If EVENT_RENDERER or EVENT_RENDERER_POST changed the model, make sure
// we use this new model instead of the current $model
$model = $event->getModel();
// If we have children, render them first, but only if:
// a) the renderer does not implement TreeRendererInterface, or
// b) it does, but canRenderTrees() returns false
if ($model->hasChildren()
&& (! $renderer instanceof TreeRendererInterface
|| ! $renderer->canRenderTrees())
) {
$this->renderChildren($model);
}
// Reset the model, in case it has changed, and set the renderer
$event->setModel($model);
$event->setRenderer($renderer);
$rendered = $renderer->render($model);
// If this is a child model, return the rendered content; do not
// invoke the response strategy.
$options = $model->getOptions();
if (array_key_exists('has_parent', $options) && $options['has_parent']) {
return $rendered;
}
$event->setResult($rendered);
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
/**
* Loop through children, rendering each
*
* @param Model $model
* @throws Exception\DomainException
* @return void
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
/**
* Loop through children, rendering each
*
* @param Model $model
* @throws Exception\DomainException
* @return void
*/
protected function renderChildren(Model $model)
{
foreach ($model as $child) {
if ($child->terminate()) {
throw new Exception\DomainException('Inconsistent state; child view model is marked as terminal');
}
$child->setOption('has_parent', true);
$result = $this->render($child);
$child->setOption('has_parent', null);
$capture = $child->captureTo();
if (! empty($capture)) {
if ($child->isAppend()) {
$oldResult = $model->{$capture};
$model->setVariable($capture, $oldResult . $result);
} else {
$model->setVariable($capture, $result);
}
}
}
}
/**
* Create and return ViewEvent used by render()
*
* @return ViewEvent
*/
protected function getEvent()
{
__METHOD__
));
}
$event->setRenderer($renderer);
$event->setName(ViewEvent::EVENT_RENDERER_POST);
$events->triggerEvent($event);
// If EVENT_RENDERER or EVENT_RENDERER_POST changed the model, make sure
// we use this new model instead of the current $model
$model = $event->getModel();
// If we have children, render them first, but only if:
// a) the renderer does not implement TreeRendererInterface, or
// b) it does, but canRenderTrees() returns false
if ($model->hasChildren()
&& (! $renderer instanceof TreeRendererInterface
|| ! $renderer->canRenderTrees())
) {
$this->renderChildren($model);
}
// Reset the model, in case it has changed, and set the renderer
$event->setModel($model);
$event->setRenderer($renderer);
$rendered = $renderer->render($model);
// If this is a child model, return the rendered content; do not
// invoke the response strategy.
$options = $model->getOptions();
if (array_key_exists('has_parent', $options) && $options['has_parent']) {
return $rendered;
}
$event->setResult($rendered);
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
if ($result instanceof Response) {
return $result;
}
// Martial arguments
$request = $e->getRequest();
$response = $e->getResponse();
$viewModel = $e->getViewModel();
if (! $viewModel instanceof ViewModel) {
return;
}
$view = $this->view;
$view->setRequest($request);
$view->setResponse($response);
$caughtException = null;
try {
$view->render($viewModel);
} catch (\Throwable $ex) {
$caughtException = $ex;
} catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced
$caughtException = $ex;
}
if ($caughtException !== null) {
if ($e->getName() === MvcEvent::EVENT_RENDER_ERROR) {
throw $caughtException;
}
$application = $e->getApplication();
$events = $application->getEventManager();
$e->setError(Application::ERROR_EXCEPTION);
$e->setParam('exception', $caughtException);
$e->setName(MvcEvent::EVENT_RENDER_ERROR);
$events->triggerEvent($e);
}
}
if ($this->sharedManager) {
foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
$listOfListenersByPriority[$priority][] = $listeners;
}
}
// Sort by priority in reverse order
krsort($listOfListenersByPriority);
// Initial value of stop propagation flag should be false
$event->stopPropagation(false);
// Execute listeners
$responses = new ResponseCollection();
foreach ($listOfListenersByPriority as $listOfListeners) {
foreach ($listOfListeners as $listeners) {
foreach ($listeners as $listener) {
$response = $listener($event);
$responses->push($response);
// If the event was asked to stop propagating, do so
if ($event->propagationIsStopped()) {
$responses->setStopped(true);
return $responses;
}
// If the result causes our validation callback to return true,
// stop propagation
if ($callback && $callback($response)) {
$responses->setStopped(true);
return $responses;
}
}
}
}
return $responses;
}
$event = clone $this->eventPrototype;
$event->setName($eventName);
if ($target !== null) {
$event->setTarget($target);
}
if ($argv) {
$event->setParams($argv);
}
return $this->triggerListeners($event, $callback);
}
/**
* @inheritDoc
*/
public function triggerEvent(EventInterface $event)
{
return $this->triggerListeners($event);
}
/**
* @inheritDoc
*/
public function triggerEventUntil(callable $callback, EventInterface $event)
{
return $this->triggerListeners($event, $callback);
}
/**
* @inheritDoc
*/
public function attach($eventName, callable $listener, $priority = 1)
{
if (! is_string($eventName)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects a string for the event; received %s',
__METHOD__,
is_object($eventName) ? get_class($eventName) : gettype($eventName)
return $this->completeRequest($event);
}
/**
* Complete the request
*
* Triggers "render" and "finish" events, and returns response from
* event object.
*
* @param MvcEvent $event
* @return Application
*/
protected function completeRequest(MvcEvent $event)
{
$events = $this->events;
$event->setTarget($this);
$event->setName(MvcEvent::EVENT_RENDER);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
$event->setName(MvcEvent::EVENT_FINISH);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
return $this;
}
}
// Trigger dispatch event
$event->setName(MvcEvent::EVENT_DISPATCH);
$event->stopPropagation(false); // Clear before triggering
$result = $events->triggerEventUntil($shortCircuit, $event);
// Complete response
$response = $result->last();
if ($response instanceof ResponseInterface) {
$event->setName(MvcEvent::EVENT_FINISH);
$event->setTarget($this);
$event->setResponse($response);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
$this->response = $response;
return $this;
}
$response = $this->response;
$event->setResponse($response);
return $this->completeRequest($event);
}
/**
* Complete the request
*
* Triggers "render" and "finish" events, and returns response from
* event object.
*
* @param MvcEvent $event
* @return Application
*/
protected function completeRequest(MvcEvent $event)
{
$events = $this->events;
$event->setTarget($this);
$event->setName(MvcEvent::EVENT_RENDER);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
// Composer autoloading
include __DIR__ . '/../vendor/autoload.php';
if (! class_exists(Application::class)) {
throw new RuntimeException(
"Unable to load application.\n"
. "- Type `composer install` if you are developing locally.\n"
. "- Type `vagrant ssh -c 'composer install'` if you are using Vagrant.\n"
. "- Type `docker-compose run laminas composer install` if you are using Docker.\n"
);
}
// Retrieve configuration
$appConfig = require __DIR__ . '/../config/application.config.php';
if (file_exists(__DIR__ . '/../config/development.config.php')) {
$appConfig = ArrayUtils::merge($appConfig, require __DIR__ . '/../config/development.config.php');
}
// Run the application!
Application::init($appConfig)->run();