Skip to content

Instantly share code, notes, and snippets.

@linxlad
Last active August 29, 2015 14:24
Show Gist options
  • Save linxlad/59de9887fab49998285a to your computer and use it in GitHub Desktop.
Save linxlad/59de9887fab49998285a to your computer and use it in GitHub Desktop.
Shout boxes
// Configure any shout boxes
$shoutBoxes = [];
$shouts = $this->entityManager->getRepository('AppBundle:ShoutBox')
->findBy(['active' => 'active', 'deleted' => 0]);
if (!empty($shouts)) {
foreach ($shouts as $shout) {
$shoutBoxes[] = [
'name' => $shout->getName(),
'icon' => '',
'title' => $shout->getTitle(),
'content' => $shout->getContent(),
'form' => $form
];
foreach ($this->action as $action) {
$shoutBoxes[]['actions'] = [
'label' => $action->getLabelText(),
'icon' => $action->getIcon(),
'url' => $action->getUrl()
];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment