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


PHP CRM_Core_BAO_OptionValue::updateOptionWeights方法代码示例

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


在下文中一共展示了CRM_Core_BAO_OptionValue::updateOptionWeights方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: postProcess

 /**
  * Process the form submission.
  *
  *
  * @return void
  */
 public function postProcess()
 {
     if ($this->_action == CRM_Core_Action::VIEW) {
         return;
     }
     $this->_params = $this->controller->exportValues($this->_name);
     if (!empty($this->_params['contact_edit_preferences'])) {
         $preferenceWeights = explode(',', $this->_params['contact_edit_preferences']);
         foreach ($preferenceWeights as $key => $val) {
             if (!$val) {
                 unset($preferenceWeights[$key]);
             }
         }
         $opGroupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'contact_edit_options', 'id', 'name');
         CRM_Core_BAO_OptionValue::updateOptionWeights($opGroupId, array_flip($preferenceWeights));
     }
     $this->_config->editor_id = $this->_params['editor_id'];
     $this->postProcessCommon();
     // If "Configure CKEditor" button was clicked
     if (!empty($this->_params['ckeditor_config'])) {
         // Suppress the "Saved" status message and redirect to the CKEditor Config page
         $session = CRM_Core_Session::singleton();
         $session->getStatus(TRUE);
         $url = CRM_Utils_System::url('civicrm/admin/ckeditor', 'reset=1');
         $session->pushUserContext($url);
     }
 }
开发者ID:rajeshrhino,项目名称:civicrm-core,代码行数:33,代码来源:Display.php

示例2: postProcess

 /**
  * Process the form submission.
  *
  *
  * @return void
  */
 public function postProcess()
 {
     if ($this->_action == CRM_Core_Action::VIEW) {
         return;
     }
     $this->_params = $this->controller->exportValues($this->_name);
     if (!empty($this->_params['contact_edit_preferences'])) {
         $preferenceWeights = explode(',', $this->_params['contact_edit_preferences']);
         foreach ($preferenceWeights as $key => $val) {
             if (!$val) {
                 unset($preferenceWeights[$key]);
             }
         }
         $opGroupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'contact_edit_options', 'id', 'name');
         CRM_Core_BAO_OptionValue::updateOptionWeights($opGroupId, array_flip($preferenceWeights));
     }
     $this->_config->editor_id = $this->_params['editor_id'];
     $this->postProcessCommon();
 }
开发者ID:vakeesan26,项目名称:civicrm-core,代码行数:25,代码来源:Display.php

示例3: postProcess

 /**
  * Function to process the form
  *
  * @access public
  *
  * @return void
  */
 public function postProcess()
 {
     if ($this->_action == CRM_Core_Action::VIEW) {
         return;
     }
     $this->_params = $this->controller->exportValues($this->_name);
     if (!empty($this->_params['contact_edit_preferences'])) {
         $preferenceWeights = explode(',', $this->_params['contact_edit_preferences']);
         foreach ($preferenceWeights as $key => $val) {
             if (!$val) {
                 unset($preferenceWeights[$key]);
             }
         }
         $opGroupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'contact_edit_options', 'id', 'name');
         CRM_Core_BAO_OptionValue::updateOptionWeights($opGroupId, array_flip($preferenceWeights));
     }
     $config = CRM_Core_Config::singleton();
     if ($config->userSystem->is_drupal == '1' && module_exists("wysiwyg")) {
         variable_set('civicrm_wysiwyg_input_format', $this->_params['wysiwyg_input_format']);
     }
     $this->_config->editor_id = $this->_params['editor_id'];
     // set default editor to session if changed
     $session = CRM_Core_Session::singleton();
     $session->set('defaultWysiwygEditor', $this->_params['editor_id']);
     $this->postProcessCommon();
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:33,代码来源:Display.php

示例4: postProcess

 /**
  * Function to process the form
  *
  * @access public
  * @return None
  */
 public function postProcess()
 {
     if ($this->_action == CRM_Core_Action::VIEW) {
         return;
     }
     $this->_params = $this->controller->exportValues($this->_name);
     if (CRM_Utils_Array::value('contact_edit_prefences', $this->_params)) {
         $preferenceWeights = explode(',', $this->_params['contact_edit_prefences']);
         foreach ($preferenceWeights as $key => $val) {
             if (!$val) {
                 unset($preferenceWeights[$key]);
             }
         }
         require_once 'CRM/Core/BAO/OptionValue.php';
         $opGroupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'contact_edit_options', 'id', 'name');
         CRM_Core_BAO_OptionValue::updateOptionWeights($opGroupId, array_flip($preferenceWeights));
     }
     $this->_config->editor_id = $this->_params['wysiwyg_editor'];
     $this->_config->display_name_format = $this->_params['display_name_format'];
     $this->_config->sort_name_format = $this->_params['sort_name_format'];
     // set default editor to session if changed
     $session = CRM_Core_Session::singleton();
     $session->set('defaultWysiwygEditor', $this->_params['wysiwyg_editor']);
     parent::postProcess();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:31,代码来源:Display.php


注:本文中的CRM_Core_BAO_OptionValue::updateOptionWeights方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。