当前位置: 首页>>代码示例>>PHP>>正文


PHP unknown_type::setMain方法代码示例

本文整理汇总了PHP中unknown_type::setMain方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::setMain方法的具体用法?PHP unknown_type::setMain怎么用?PHP unknown_type::setMain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unknown_type的用法示例。


在下文中一共展示了unknown_type::setMain方法的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::setMain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。