protected function getConfigByTheme(array $config, $themeId = null)
    {
        if (null === $themeId) {
            $themeService = $this->getServiceLocator()->get(ThemeService::SERVICE_ID);
            $themeId = $themeService->getCurrentThemeId();
        }
        if (is_array(reset($config))) {
            if (array_key_exists($themeId, $config)) {
                $config = $config[$themeId];
            } else {
                $config = array_shift($config);
            }
        }
        return $config;
    }
protected function getConfigByTheme(array $config, $themeId = null)
    {
        if (null === $themeId) {
            $themeService = $this->getServiceLocator()->get(ThemeService::SERVICE_ID);
            $themeId = $themeService->getCurrentThemeId();
        }
        if (is_array(reset($config))) {
            if (array_key_exists($themeId, $config)) {
                $config = $config[$themeId];
            } else {
                $config = array_shift($config);
            }
        }
        return $config;
    }
protected function getConfigByTheme ( array $ config , $ themeId = null ) { if ( null === $ themeId ) { $ themeService = $ this -> getServiceLocator ( ) -> get ( ThemeService :: SERVICE_ID ) ; $ themeId = $ themeService -> getCurrentThemeId ( ) ; } if ( is_array ( reset ( $ config ) ) ) { if ( array_key_exists ( $ themeId , $ config ) ) { $ config = $ config [ $ themeId ] ; } else { $ config = array_shift ( $ config ) ; } } return $ config ; }
Returns the current theme's related config
@param array $config
@param string $themeId
@return array|mixed
Returns the current theme s related config