public function formPMGmail() { try { $this->includeExtJS('admin/pmGmail'); if (!empty($_SESSION['__PMGMAIL_ERROR__'])) { $this->setJSVar('__PMGMAIL_ERROR__', $_SESSION['__PMGMAIL_ERROR__']); unset($_SESSION['__PMGMAIL_ERROR__']); } G::LoadClass("pmGoogleApi"); $pmGoogle = new PMGoogleApi(); $accountEmail = $pmGoogle->getServiceAccountEmail(); $fileP12 = $pmGoogle->getServiceAccountP12(); $fileJson = $pmGoogle->getAccountJson(); $fileJson = $fileJson == null ? '' : $fileJson; $type = $pmGoogle->getTypeAuthentication(); $enablePMGmail = $pmGoogle->getStatusService(); $this->setJSVar('accountEmail', $accountEmail); $this->setJSVar('fileP12', $fileP12); $this->setJSVar('enablePMGmail', $enablePMGmail); $this->setJSVar('fileJson', $fileJson); $this->setJSVar('typeAuthentication', $type); G::RenderPage('publish', 'extJs'); } catch (Exception $error) { $_SESSION['__PMGMAIL_ERROR__'] = $error->getMessage(); die; } }