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


PHP CRM_Core_BAO_UFField::setUFFieldStatus方法代码示例

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


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

示例1: setIsActive

 /**
  * update the is_active flag in the db
  *
  * @param  int      $id         id of the database record
  * @param  boolean  $is_active  value we want to set the is_active field
  *
  * @return Object             DAO object on sucess, null otherwise
  * @static
  * @access public
  */
 static function setIsActive($id, $is_active)
 {
     require_once 'CRM/Core/BAO/UFField.php';
     if ($is_active) {
         //CRM_Core_BAO_UFField::setUFFieldStatus($id, $is_active);
     } else {
         CRM_Core_BAO_UFField::setUFFieldStatus($id, $is_active);
     }
     return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_CustomGroup', $id, 'is_active', $is_active);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:20,代码来源:CustomGroup.php

示例2: setIsActive

 /**
  * Update the is_active flag in the db.
  *
  * @param int $id
  *   Id of the database record.
  * @param bool $is_active
  *   Value we want to set the is_active field.
  *
  * @return Object
  *   DAO object on success, null otherwise
  */
 public static function setIsActive($id, $is_active)
 {
     // reset the cache
     CRM_Core_BAO_Cache::deleteGroup('contact fields');
     if (!$is_active) {
         CRM_Core_BAO_UFField::setUFFieldStatus($id, $is_active);
     }
     return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_CustomGroup', $id, 'is_active', $is_active);
 }
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:20,代码来源:CustomGroup.php

示例3: run

 /**
  * Run the page.
  *
  * This method is called after the page is created. It checks for the  
  * type of action and executes that action.
  * Finally it calls the parent's run method.
  * 
  * @param null
  * 
  * @return void
  * @access public
  *
  */
 function run()
 {
     // get the requested action
     $action = CRM_Utils_Request::retrieve('action', $this, false, 'browse');
     // default to 'browse'
     if ($action & CRM_CORE_ACTION_DELETE) {
         $session =& CRM_Core_Session::singleton();
         $session->pushUserContext(CRM_Utils_System::url('civicrm/admin/custom/group/', 'action=browse'));
         $controller =& new CRM_Core_Controller_Simple('CRM_Custom_Form_DeleteGroup', "Delete Cutom Group", $mode);
         $id = CRM_Utils_Request::retrieve('id', $this, false, 0);
         $controller->set('id', $id);
         $controller->setEmbedded(true);
         $controller->process();
         $controller->run();
     }
     // 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)) {
         $this->edit($id, $action);
     } else {
         if ($action & CRM_CORE_ACTION_PREVIEW) {
             $this->preview($id);
         } else {
             require_once 'CRM/Core/BAO/CustomGroup.php';
             require_once 'CRM/Core/BAO/UFField.php';
             // if action is enable or disable to the needful.
             if ($action & CRM_CORE_ACTION_DISABLE) {
                 CRM_Core_BAO_CustomGroup::setIsActive($id, 0);
                 CRM_Core_BAO_UFField::setUFFieldStatus($id, 0);
             } else {
                 if ($action & CRM_CORE_ACTION_ENABLE) {
                     CRM_Core_BAO_CustomGroup::setIsActive($id, 1);
                     //CRM_Core_BAO_UFField::setUFFieldStatus($id, 1);
                 }
             }
             // finally browse the custom groups
             $this->browse();
         }
     }
     // parent run
     parent::run();
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:57,代码来源:Group.php


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