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


PHP CRM_Core_BAO_CustomOption::setIsActive方法代碼示例

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


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

示例1: run

 /**
  * Run the page.
  *
  * This method is called after the page is created. It checks for the  
  * type of action and executes that action. 
  * 
  * @param null
  * 
  * @return void
  * @access public
  */
 function run()
 {
     require_once 'CRM/Core/BAO/CustomField.php';
     // get the field id
     $this->_fid = CRM_Utils_Request::retrieve('fid', $this, false, 0);
     $this->_gid = CRM_Utils_Request::retrieve('gid', $this, false, 0);
     if ($this->_fid) {
         $fieldTitle = CRM_Core_BAO_CustomField::getTitle($this->_fid);
         $this->assign('fid', $this->_fid);
         $this->assign('fieldTitle', $fieldTitle);
         CRM_Utils_System::setTitle(ts('%1 - Multiple Choice Options', array(1 => $fieldTitle)));
     }
     // get the requested action
     $action = CRM_Utils_Request::retrieve('action', $this, false, 'browse');
     // default to 'browse'
     // assign vars to templates
     $this->assign('action', $action);
     $id = CRM_Utils_Request::retrieve('id', $this, false, 0);
     // what action to take ?
     if ($action & (CRM_CORE_ACTION_UPDATE | CRM_CORE_ACTION_ADD | CRM_CORE_ACTION_VIEW | CRM_CORE_ACTION_DELETE)) {
         $this->edit($action);
         // no browse for edit/update/view
     } else {
         if ($action & CRM_CORE_ACTION_DISABLE) {
             CRM_Core_BAO_CustomOption::setIsActive($id, 0);
         } else {
             if ($action & CRM_CORE_ACTION_ENABLE) {
                 CRM_Core_BAO_CustomOption::setIsActive($id, 1);
             }
         }
         $this->browse();
     }
     // Call the parents run method
     parent::run();
 }
開發者ID:bhirsch,項目名稱:voipdrupal-4.7-1.0,代碼行數:46,代碼來源:Option.php


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