public function isLogged()
    {
        return $this->get('security.token_storage')->getToken() && $this->get('security.token_storage')->getToken()->isAuthenticated() && is_object($this->getUser());
    }