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


PHP unknown_type::setAutoBr方法代碼示例

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


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

示例1: EventPagesEditSubmit

 /**
  * Обработка отправки формы при редактировании страницы
  *
  * @param unknown_type $oPageEdit
  */
 protected function EventPagesEditSubmit($oPageEdit)
 {
     $this->Security_ValidateSendForm();
     // * Проверяем корректность полей
     if (!$this->EventPagesCheckFields()) {
         return;
     }
     if ($oPageEdit->getId() == getRequest('page_pid')) {
         $this->_messageError($this->Lang_Get('system_error'), 'page:edit');
         return;
     }
     // * Обновляем свойства страницы
     $oPageEdit->setAutoBr(getRequest('page_auto_br') ? 1 : 0);
     $oPageEdit->setActive(getRequest('page_active') ? 1 : 0);
     $oPageEdit->setMain(getRequest('page_main') ? 1 : 0);
     $oPageEdit->setDateEdit(date("Y-m-d H:i:s"));
     if (getRequest('page_pid') == 0) {
         $oPageEdit->setUrlFull(getRequest('page_url'));
         $oPageEdit->setPid(null);
     } else {
         $oPageEdit->setPid(getRequest('page_pid'));
         $oPageParent = $this->PluginPage_Page_GetPageById(getRequest('page_pid'));
         $oPageEdit->setUrlFull($oPageParent->getUrlFull() . '/' . getRequest('page_url'));
     }
     $oPageEdit->setSeoDescription(getRequest('page_seo_description'));
     $oPageEdit->setSeoKeywords(getRequest('page_seo_keywords'));
     $oPageEdit->setText(getRequest('page_text'));
     $oPageEdit->setTitle(getRequest('page_title'));
     $oPageEdit->setUrl(getRequest('page_url'));
     $oPageEdit->setSort(intval(getRequest('page_sort')));
     $oPageEdit->setOtherUrl(getRequest('page_other_url'));
     // * Обновляем страницу
     if ($this->PluginPage_Page_UpdatePage($oPageEdit)) {
         $this->PluginPage_Page_RebuildUrlFull($oPageEdit);
         $this->_messageNotice($this->Lang_Get('page_edit_submit_save_ok'), 'page:edit');
         $this->SetParam(0, null);
         $this->SetParam(1, null);
     } else {
         $this->_messageError($this->Lang_Get('system_error'), 'page:edit');
     }
 }
開發者ID:olegverstka,項目名稱:kprf.dev,代碼行數:46,代碼來源:ActionAdmin_EventPages.class.php

示例2: SubmitEditPage

 /**
  * Обработка отправки формы при редактировании страницы
  *
  * @param unknown_type $oPageEdit
  */
 protected function SubmitEditPage($oPageEdit)
 {
     /**
      * Проверяем корректность полей
      */
     if (!$this->CheckPageFields()) {
         return;
     }
     if ($oPageEdit->getId() == getRequest('page_pid')) {
         $this->Message_AddError($this->Lang_Get('system_error'));
         return;
     }
     /**
      * Обновляем свойства страницы
      */
     $oPageEdit->setActive(getRequest('page_active') ? 1 : 0);
     $oPageEdit->setAutoBr(getRequest('page_auto_br') ? 1 : 0);
     $oPageEdit->setMain(getRequest('page_main') ? 1 : 0);
     $oPageEdit->setDateEdit(date("Y-m-d H:i:s"));
     if (getRequest('page_pid') == 0) {
         $oPageEdit->setUrlFull(getRequest('page_url'));
         $oPageEdit->setPid(null);
     } else {
         $oPageEdit->setPid(getRequest('page_pid'));
         $oPageParent = $this->PluginPage_Page_GetPageById(getRequest('page_pid'));
         $oPageEdit->setUrlFull($oPageParent->getUrlFull() . '/' . getRequest('page_url'));
     }
     $oPageEdit->setSeoDescription(getRequest('page_seo_description'));
     $oPageEdit->setSeoKeywords(getRequest('page_seo_keywords'));
     $oPageEdit->setText(getRequest('page_text'));
     $oPageEdit->setTitle(getRequest('page_title'));
     $oPageEdit->setUrl(getRequest('page_url'));
     $oPageEdit->setSort(getRequest('page_sort'));
     /**
      * Обновляем страницу
      */
     if ($this->PluginPage_Page_UpdatePage($oPageEdit)) {
         $this->PluginPage_Page_RebuildUrlFull($oPageEdit);
         $this->Message_AddNotice($this->Lang_Get('plugin.page.edit_submit_save_ok'));
         $this->SetParam(0, null);
         $this->SetParam(1, null);
     } else {
         $this->Message_AddError($this->Lang_Get('system_error'));
     }
 }
開發者ID:lunavod,項目名稱:bunker_stable,代碼行數:50,代碼來源:ActionPage.class.php


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