本文整理汇总了PHP中CRM_Core_DAO_Mapping::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_DAO_Mapping::delete方法的具体用法?PHP CRM_Core_DAO_Mapping::delete怎么用?PHP CRM_Core_DAO_Mapping::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_DAO_Mapping
的用法示例。
在下文中一共展示了CRM_Core_DAO_Mapping::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: del
/**
* Delete the mapping.
*
* @param int $id
* Mapping id.
*
* @return bool
*/
public static function del($id)
{
// delete from mapping_field table
$mappingField = new CRM_Core_DAO_MappingField();
$mappingField->mapping_id = $id;
$mappingField->delete();
// delete from mapping table
$mapping = new CRM_Core_DAO_Mapping();
$mapping->id = $id;
if ($mapping->find(TRUE)) {
$result = $mapping->delete();
return $result;
}
return FALSE;
}
示例2: del
/**
* Delete the mapping.
*
* @param int $id
* Mapping id.
*
* @return bool
*/
public static function del($id)
{
// delete from mapping_field table
$mappingField = new CRM_Core_DAO_MappingField();
$mappingField->mapping_id = $id;
$mappingField->find();
while ($mappingField->fetch()) {
$mappingField->delete();
}
// delete from mapping table
$mapping = new CRM_Core_DAO_Mapping();
$mapping->id = $id;
$mapping->delete();
CRM_Core_Session::setStatus(ts('Selected mapping has been deleted successfully.'), ts('Deleted'), 'success');
return TRUE;
}
示例3: mappingDelete
/**
* Delete a Mapping
*
* @param int $mappingId
*/
public function mappingDelete($mappingId)
{
$mapping = new CRM_Core_DAO_Mapping();
$mapping->id = $mappingId;
$mapping->delete();
}
示例4: del
/**
* Function to delete the mapping
*
* @param int $id mapping id
*
* @return boolean
* @access public
* @static
*
*/
static function del($id)
{
// delete from mapping_field table
require_once "CRM/Core/DAO/MappingField.php";
$mappingField = new CRM_Core_DAO_MappingField();
$mappingField->mapping_id = $id;
$mappingField->find();
while ($mappingField->fetch()) {
$mappingField->delete();
}
// delete from mapping table
$mapping = new CRM_Core_DAO_Mapping();
$mapping->id = $id;
$mapping->delete();
CRM_Core_Session::setStatus(ts('Selected Mapping has been Deleted Successfuly.'));
return true;
}