當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Sh404sefHelperGeneral::prepareAjaxResponse方法代碼示例

本文整理匯總了PHP中Sh404sefHelperGeneral::prepareAjaxResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sh404sefHelperGeneral::prepareAjaxResponse方法的具體用法?PHP Sh404sefHelperGeneral::prepareAjaxResponse怎麽用?PHP Sh404sefHelperGeneral::prepareAjaxResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sh404sefHelperGeneral的用法示例。


在下文中一共展示了Sh404sefHelperGeneral::prepareAjaxResponse方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 public function display($tpl = null)
 {
     // declare docoument mime type
     $document = JFactory::getDocument();
     $document->setMimeEncoding('text/xml');
     // call helper to prepare response xml file content
     $response = Sh404sefHelperGeneral::prepareAjaxResponse($this);
     // echo it
     echo $response;
 }
開發者ID:alesconti,項目名稱:FF_2015,代碼行數:10,代碼來源:view.raw.php

示例2: _doDefault

 private function _doDefault($tpl)
 {
     // declare docoument mime type
     $document =& JFactory::getDocument();
     $document->setMimeEncoding('text/xml');
     // call helper to prepare response xml file content
     $response = Sh404sefHelperGeneral::prepareAjaxResponse($this);
     // echo it
     echo $response;
 }
開發者ID:lautarodragan,項目名稱:ideary,代碼行數:10,代碼來源:view.raw.php

示例3: _doDefault

 /**
  * Ajax response handler for any configuration dialog
  * except quick control panel
  *
  * @param string $tpl
  */
 private function _doDefault($tpl)
 {
     // use Joomla wml object
     jimport('joomla.utilities.simplexml');
     // prepare elements of respn
     $this->assign('taskexecuted', $this->getLayout());
     $errors = $this->getError();
     $task = JRequest::getCmd('task');
     switch ($task) {
         case 'apply':
             // applying : dialog box not going to be closed
             if (($this->taskexecuted == 'default' || $this->taskexecuted == 'ext') && empty($errors)) {
                 // no errors, insert success messages
                 $this->assign('message', '<li>' . JText16::_('COM_SH404SEF_ELEMENT_SAVED') . '.</li><br /><li>' . JText16::_('COM_SH404SEF_MAY_NEED_PURGE_DIALOGBOX') . '</li>');
             } else {
                 if (empty($errors)) {
                     $this->assign('message', JText16::_('COM_SH404SEF_ELEMENT_SAVED'));
                 }
             }
             break;
         case 'save':
             // box is going to be close, we want to redirect so that message is displayed
             if (($this->taskexecuted == 'default' || $this->taskexecuted == 'ext') && empty($errors)) {
                 // no errors, tell user they must purge urls
                 $messagecode = 'COM_SH404SEF_MAY_NEED_PURGE';
             } else {
                 if (empty($errors)) {
                     // no errors, but no need to purge : seo settings, security settings, etc
                     $messagecode = 'COM_SH404SEF_ELEMENT_SAVED';
                 }
             }
             $this->assign('redirectTo', $this->defaultRedirectUrl);
             $this->assign('messagecode', $messagecode);
             break;
     }
     // use helper to prepare response
     $response = Sh404sefHelperGeneral::prepareAjaxResponse($this);
     // declare docoument mime type
     $document =& JFactory::getDocument();
     $document->setMimeEncoding('text/xml');
     // output resulting text, no need for a layout file I think
     echo $response;
 }
開發者ID:sangkasi,項目名稱:joomla,代碼行數:49,代碼來源:view.raw.php


注:本文中的Sh404sefHelperGeneral::prepareAjaxResponse方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。