當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。