Example #1
0
 /**
  * Find and initialize GoogleAnalytic helper before rendering inline scripts.
  * 
  * @see \Zend\View\Helper\HeadScript::toString()
  * @param string $indent
  * @return string
  */
 public function toString($indent = null)
 {
     $helperManager = $this->getView()->getHelperPluginManager();
     if ($helperManager->has('googleAnalytic')) {
         $googleAnalytic = $helperManager->get('googleAnalytic');
         $googleAnalytic->initialize();
     }
     return parent::toString();
 }