public function createService(ServiceLocatorInterface $viewHelperManager)
    {
        $serviceLocator = $viewHelperManager->getServiceLocator();
        $config = $serviceLocator->has('config') ? $serviceLocator->get('config') : array();
        if (isset($config['google_analytics'])) {
            $this->config($config['google_analytics']);
        }
    
        return $this;
    }
public function createService(ServiceLocatorInterface $viewHelperManager)
    {
        $serviceLocator = $viewHelperManager->getServiceLocator();
        $config = $serviceLocator->has('config') ? $serviceLocator->get('config') : array();
        if (isset($config['google_analytics'])) {
            $this->config($config['google_analytics']);
        }
    
        return $this;
    }
public function createService ( ServiceLocatorInterface $ viewHelperManager ) { $ serviceLocator = $ viewHelperManager -> getServiceLocator ( ) ; $ config = $ serviceLocator -> has ( 'config' ) ? $ serviceLocator -> get ( 'config' ) : array ( ) ; if ( isset ( $ config [ 'google_analytics' ] ) ) { $ this -> config ( $ config [ 'google_analytics' ] ) ; } return $ this ; }
Create and configure helper instance

@see \Zend\ServiceManager\FactoryInterface::createService()
@param ServiceLocatorInterface $viewHelperManager
@return \Spork\View\Helper\GoogleAnalytic
Create and configure helper instance