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


PHP CRM_Core_BAO_CustomGroup::deleteGroup方法代码示例

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


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

示例1: postProcess

 /**
  * Process the form when submitted
  *
  * @return void
  * @access public
  */
 public function postProcess()
 {
     $group = new CRM_Core_DAO_CustomGroup();
     $group->id = $this->_id;
     $group->find(TRUE);
     $wt = CRM_Utils_Weight::delWeight('CRM_Core_DAO_CustomGroup', $this->_id);
     CRM_Core_BAO_CustomGroup::deleteGroup($group);
     CRM_Core_Session::setStatus(ts("The Group '%1' has been deleted.", array(1 => $group->title)), '', 'success');
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:15,代码来源:DeleteGroup.php

示例2: civicrm_api3_custom_group_delete

/**
 * Use this API to delete an existing group.
 *
 * @param array $params
 *
 * @return array
 */
function civicrm_api3_custom_group_delete($params)
{
    $values = new CRM_Core_DAO_CustomGroup();
    $values->id = $params['id'];
    $values->find(TRUE);
    $result = CRM_Core_BAO_CustomGroup::deleteGroup($values, TRUE);
    return $result ? civicrm_api3_create_success() : civicrm_api3_create_error('Error while deleting custom group');
}
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:15,代码来源:CustomGroup.php

示例3: testDeleteGroup

 /**
  * Function to test deleteGroup()
  */
 function testDeleteGroup()
 {
     $customGrouptitle = 'My Custom Group';
     $groupParams = array('title' => $customGrouptitle, 'name' => 'my_custom_group', 'style' => 'Tab', 'extends' => 'Individual', 'is_active' => 1);
     $customGroup = Custom::createGroup($groupParams);
     $customGroupId = $customGroup->id;
     //get the custom group title
     $dbCustomGroupTitle = $this->assertDBNotNull('CRM_Core_DAO_CustomGroup', $customGroupId, 'title', 'id', 'Database check for custom group record.');
     //check for group title
     $this->assertEquals($customGrouptitle, $dbCustomGroupTitle);
     require_once 'CRM/Core/BAO/CustomGroup.php';
     //delete the group
     $isDelete = CRM_Core_BAO_CustomGroup::deleteGroup($customGroup);
     //check for delete
     $this->assertEquals(true, $isDelete);
     //check the DB
     $this->assertDBNull('CRM_Core_DAO_CustomGroup', $customGroupId, 'title', 'id', 'Database check for custom group record.');
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:21,代码来源:CustomGroupTest.php

示例4: postProcess

 /**
  * Process the form when submitted
  *
  * @return void
  * @access public
  */
 function postProcess()
 {
     $group =& new CRM_Core_DAO_CustomGroup();
     $group->id = $this->_id;
     $group->find();
     $group->fetch();
     if (CRM_Core_BAO_CustomGroup::deleteGroup($this->_id)) {
         CRM_Core_Session::setStatus(ts('The Group "%1" has been deleted.', array(1 => $group->title)));
     } else {
         CRM_Core_Session::setStatus(ts('The Group "%1" has not been deleted! You must Delete all custom fields in this group prior to deleting the group', array(1 => $group->title)));
     }
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:18,代码来源:DeleteGroup.php

示例5: deleteGroup

 /**
  * Helper function to delete custom group
  * @deprecated use function on parent class
  * @param  object Custom Group to delete
  * @return boolean true if Group deleted, false otherwise
  */
 static function deleteGroup($params)
 {
     require_once 'CRM/Core/BAO/CustomGroup.php';
     $deleteCustomGroup = CRM_Core_BAO_CustomGroup::deleteGroup($params, TRUE);
     return $deleteCustomGroup;
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:12,代码来源:Custom.php

示例6: testDeleteGroup

 /**
  * Test deleteGroup.
  */
 public function testDeleteGroup()
 {
     $customGroupTitle = 'My Custom Group';
     $groupParams = array('title' => $customGroupTitle, 'name' => 'my_custom_group', 'style' => 'Tab', 'extends' => 'Individual', 'is_active' => 1);
     $customGroup = $this->customGroupCreate($groupParams);
     $groupObject = new CRM_Core_BAO_CustomGroup();
     $groupObject->id = $customGroup['id'];
     $groupObject->find(TRUE);
     $isDelete = CRM_Core_BAO_CustomGroup::deleteGroup($groupObject);
     // Check it worked!
     $this->assertEquals(TRUE, $isDelete);
     $this->assertDBNull('CRM_Core_DAO_CustomGroup', $customGroup['id'], 'title', 'id', 'Database check for custom group record.');
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:16,代码来源:CustomGroupTest.php

示例7: civicrm_custom_group_delete

/**
 * Use this API to delete an existing group.
 *
 * @param array id of the group to be deleted
 *
 * @return Null if success
 * @access public
 **/
function civicrm_custom_group_delete($params)
{
    _civicrm_initialize();
    if (!is_array($params)) {
        return civicrm_create_error('Params is not an array');
    }
    if (!CRM_Utils_Array::value('id', $params)) {
        return civicrm_create_error('Invalid or no value for Custom group ID');
    }
    // convert params array into Object
    require_once 'CRM/Core/DAO/CustomGroup.php';
    $values = new CRM_Core_DAO_CustomGroup();
    $values->id = $params['id'];
    $values->find(true);
    require_once 'CRM/Core/BAO/CustomGroup.php';
    $result = CRM_Core_BAO_CustomGroup::deleteGroup($values);
    return $result ? civicrm_create_success() : civicrm_error('Error while deleting custom group');
}
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:26,代码来源:CustomGroup.php

示例8: deleteGroup

 /**
  * Helper function to delete custom group.
  *
  * @deprecated use function on parent class
  *
  * @param $params
  *
  * @return bool
  *   true if Group deleted, false otherwise
  */
 public static function deleteGroup($params)
 {
     $deleteCustomGroup = CRM_Core_BAO_CustomGroup::deleteGroup($params, TRUE);
     return $deleteCustomGroup;
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:15,代码来源:Custom.php


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