public function attachViewResolver()
    {
        if (!$this->viewResolverAttached) {
            $this->viewResolverAttached = true;
            $resolver = $this->serviceManager->get('ViewResolver');
            $resolver->attach($this, 100);
        }
    }