public function updateDynareas(\Zend\EventManager\Event $e)
    {
        $dynareas = $e->getParam('dynareas');

        $gameService = $e->getTarget()->getServiceManager()->get('playgroundgame_game_service');

        $games = $gameService->getActiveGames(false);

        foreach ($games as $game) {
            $array = array(
                'game'.$game->getId()=> array(
                    'title'             => $game->getTitle(),
                    'description'       => $game->getClassType(),
                    'location'          => 'pages du jeu'
                )
            );
            $dynareas = array_merge($dynareas, $array);
        }

        return $dynareas;
    }
public function updateDynareas(\Zend\EventManager\Event $e)
    {
        $dynareas = $e->getParam('dynareas');

        $gameService = $e->getTarget()->getServiceManager()->get('playgroundgame_game_service');

        $games = $gameService->getActiveGames(false);

        foreach ($games as $game) {
            $array = array(
                'game'.$game->getId()=> array(
                    'title'             => $game->getTitle(),
                    'description'       => $game->getClassType(),
                    'location'          => 'pages du jeu'
                )
            );
            $dynareas = array_merge($dynareas, $array);
        }

        return $dynareas;
    }
public function updateDynareas ( \ Zend \ EventManager \ Event $ e ) { $ dynareas = $ e -> getParam ( 'dynareas' ) ; $ gameService = $ e -> getTarget ( ) -> getServiceManager ( ) -> get ( 'playgroundgame_game_service' ) ; $ games = $ gameService -> getActiveGames ( false ) ; foreach ( $ games as $ game ) { $ array = array ( 'game' . $ game -> getId ( ) => array ( 'title' => $ game -> getTitle ( ) , 'description' => $ game -> getClassType ( ) , 'location' => 'pages du jeu' ) ) ; $ dynareas = array_merge ( $ dynareas , $ array ) ; } return $ dynareas ; }
This method get the games and add them as Dynareas to PlaygroundCms
so that blocks can be dynamically added to the games.

@param  MvcEvent $e
@return array
This method get the games and add them as Dynareas to PlaygroundCms so that blocks can be dynamically added to the games .