Created
July 3, 2015 12:12
-
-
Save linxlad/69cc750e4d35dd0fb9b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configure any shout boxes | |
$shoutBoxes = []; | |
$shouts = $this->entityManager->getRepository('AppBundle:ShoutBox') | |
->findBy(['active' => 'active', 'deleted' => 0]); | |
if (!empty($shouts)) { | |
foreach ($shouts as $index => $shout) { | |
$shoutBoxes[$index] = [ | |
'name' => $shout->getName(), | |
'icon' => '', | |
'title' => $shout->getTitle(), | |
'content' => $shout->getContent() | |
]; | |
foreach ($shout->getActions() as $action) { | |
$shoutBoxes[$index]['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