Skip to content

Instantly share code, notes, and snippets.

@bramstroker
Created March 20, 2013 13:04
Show Gist options
  • Save bramstroker/5204478 to your computer and use it in GitHub Desktop.
Save bramstroker/5204478 to your computer and use it in GitHub Desktop.
/**
* This action return content for the balloon popups on the map
*
* @return ViewModel
*/
public function balloonAction()
{
$reference = $this->params()->fromQuery('reference');
$type = $this->params()->fromQuery('type');
/* @var \AcsiMap\Poi\PoiProviderInterface $poiProvider */
$poiProvider = $this->getPoiProviderPluginManager()->get('campsite');
$viewModel = $poiProvider->getBalloon($type, $reference);
$viewModel->setTerminal(true);
return $viewModel;
}
@Fgruntjes
Copy link

$baloonModel = $poiProvider->getBalloon($type, $reference);
return (new ViewModel)->addChild($balloonModel, 'baloon')->setTerminal(true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment