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


PHP CRM_Core_BAO_Navigation::processUpdate方法代码示例

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


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

示例1: hrrecruitment_civicrm_postInstall

/**
 * Implementation of hook_civicrm_postInstall
 *
 * Note: This hook only runs in CiviCRM 4.4+.
 */
function hrrecruitment_civicrm_postInstall()
{
    $caseTypes = CRM_Case_PseudoConstant::caseType('name');
    $value = array_search('Application', $caseTypes);
    //update url of Find Application
    CRM_Core_BAO_Navigation::processUpdate(array('name' => 'find_application'), array('url' => "civicrm/case/search?force=1&type={$value}&reset=1"));
    CRM_Core_BAO_Navigation::resetNavigation();
    $value = CRM_Core_DAO::VALUE_SEPARATOR . $value . CRM_Core_DAO::VALUE_SEPARATOR;
    $sql = "UPDATE civicrm_custom_group SET extends_entity_column_value = '{$value}' WHERE extends_entity_column_value = 'Application'";
    CRM_Core_DAO::executeQuery($sql);
    //change the profile Type of Application
    if ($ufID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', 'application_profile', 'id', 'name')) {
        $fieldsType = CRM_Core_BAO_UFGroup::calculateGroupType($ufID, TRUE);
        CRM_Core_BAO_UFGroup::updateGroupTypes($ufID, $fieldsType);
    }
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:21,代码来源:hrrecruitment.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)
 {
     $params = array('id' => $id);
     self::retrieve($params, $contactinfo);
     $params = array('name' => "New {$contactinfo['name']}");
     $newParams = array('is_active' => $is_active);
     CRM_Core_BAO_Navigation::processUpdate($params, $newParams);
     CRM_Core_BAO_Navigation::resetNavigation();
     return CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_ContactType', $id, 'is_active', $is_active);
 }
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:21,代码来源:ContactType.php

示例3: _hrstaffdir_setActiveFields

function _hrstaffdir_setActiveFields($oParams, $nParams)
{
    $profileId = hrstaffdir_getUFGroupID();
    $path = array('url' => "civicrm/profile?reset=1&gid={$profileId}&force=1");
    $navigationPath = CRM_Core_BAO_Navigation::retrieve($path, $defaultpath);
    if ($navigationPath) {
        $params = array('label' => 'Directory', 'url' => "civicrm/profile?reset=1&gid={$profileId}&force=1", 'is_active' => $oParams);
        $newParams = array('is_active' => $nParams);
        $navigation = CRM_Core_BAO_Navigation::processUpdate($params, $newParams);
        CRM_Core_BAO_Navigation::resetNavigation();
    }
    //disable/enable ufgroup and uffield
    $sql = "UPDATE civicrm_uf_field JOIN civicrm_uf_group ON civicrm_uf_group.id = civicrm_uf_field.uf_group_id SET civicrm_uf_field.is_active = {$nParams} WHERE civicrm_uf_group.name = 'hrstaffdir_listing'";
    CRM_Core_DAO::executeQuery($sql);
    CRM_Core_DAO::executeQuery("UPDATE civicrm_uf_group SET is_active = {$nParams} WHERE name = 'hrstaffdir_listing'");
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:16,代码来源:hrstaffdir.php

示例4: hrprofile_updateNavigation

function hrprofile_updateNavigation($orginalUrl, $updatedUrl)
{
    $navigationParams = array('label' => 'Directory', 'url' => "{$orginalUrl}", 'is_active' => 1);
    $navigationParamsNew = array('label' => 'Directory', 'url' => "{$updatedUrl}", 'is_active' => 1);
    $navigation = CRM_Core_BAO_Navigation::processUpdate($navigationParams, $navigationParamsNew);
    return true;
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:7,代码来源:hrprofile.php


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