本文整理汇总了PHP中CRMEntity::get_assigned_to_id方法的典型用法代码示例。如果您正苦于以下问题:PHP CRMEntity::get_assigned_to_id方法的具体用法?PHP CRMEntity::get_assigned_to_id怎么用?PHP CRMEntity::get_assigned_to_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRMEntity
的用法示例。
在下文中一共展示了CRMEntity::get_assigned_to_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eventAjaxDeleteSingleEntity
/**
* function to delete single record from list view and related list view
* @param object $evctl
* @return 0 or 1
* @see view/listview.php
* @see view/related_listview_entry.php
*/
function eventAjaxDeleteSingleEntity(EventControler $evctl)
{
$referrer = $evctl->referrer;
if ($referrer == 'list') {
$module = $evctl->module;
} elseif ($referrer == 'related') {
$idrelated_information = (int) $evctl->related_record_id;
$do_related_information = new CRMRelatedInformation();
$do_related_information->getId($idrelated_information);
if ($do_related_information->getNumRows() > 0) {
$module = $do_related_information->related_module;
}
}
if ($module != '') {
$module_id = $_SESSION["do_module"]->get_idmodule_by_name($module, $_SESSION["do_module"]);
$id = (int) $evctl->sqrecord;
$allow_del = $_SESSION["do_crm_action_permission"]->action_permitted('delete', $module_id, $id);
if ($allow_del === true) {
$do_data_history = new DataHistory();
$crm_entity = new CRMEntity();
$do_feed_queue = new LiveFeedQueue();
$do_process_plugins = new CRMPluginProcessor();
//delete code for the record goes here
// process before delete plugin
$do_process_plugins->process_action_plugins($module_id, null, 5, $id);
if (strlen($do_process_plugins->get_error()) > 2) {
echo $do_process_plugins->get_error();
} else {
$this->delete_record($id, $module);
$do_data_history->add_history($id, $module_id, 'delete');
// Add to feed
$feed_other_assigne = array();
$entity_assigned_to = $crm_entity->get_assigned_to_id($id, $module);
if (is_array($entity_assigned_to) && sizeof($entity_assigned_to) > 0) {
if (array_key_exists("idgroup", $entity_assigned_to) && $entity_assigned_to["idgroup"]) {
$feed_other_assigne = array("related" => "group", "data" => array("key" => "oldgroup", "val" => (int) $entity_assigned_to["idgroup"]));
}
}
$record_identity = $crm_entity->get_entity_identifier($id, $module);
$do_feed_queue->add_feed_queue($id, $module_id, $record_identity, 'delete', $feed_other_assigne);
// process after delete plugin
$do_process_plugins->process_action_plugins($module_id, null, 5, $id);
echo '1';
}
} else {
echo '0';
}
} else {
echo '0';
}
}