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


PHP CRM_Report_Utils_Report::getInstanceIDForValue方法代码示例

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


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

示例1: registerScripts

 static function registerScripts()
 {
     static $loaded = FALSE;
     if ($loaded) {
         return;
     }
     $loaded = TRUE;
     CRM_Core_Resources::singleton()->addSettingsFactory(function () {
         $config = CRM_Core_Config::singleton();
         return array('PseudoConstant' => array('locationType' => CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'), 'job_hours_time' => CRM_Hrjobcontract_Page_JobContractTab::getJobHoursTime(), 'working_days' => CRM_Hrjobcontract_Page_JobContractTab::getDaysPerTime()), 'FieldOptions' => CRM_Hrjobcontract_Page_JobContractTab::getFieldOptions(), 'jobContractTabApp' => array('contactId' => CRM_Utils_Request::retrieve('cid', 'Integer'), 'domainId' => CRM_Core_Config::domainID(), 'isLogEnabled' => (bool) $config->logging, 'loggingReportId' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'), 'currencies' => CRM_Hrjobcontract_Page_JobContractTab::getCurrencyFormats(), 'defaultCurrency' => $config->defaultCurrency, 'path' => CRM_Core_Resources::singleton()->getUrl('org.civicrm.hrjobcontract'), 'fields' => CRM_Hrjobcontract_Page_JobContractTab::getFields(), 'contractList' => CRM_Hrjobcontract_Page_JobContractTab::getContractList(), 'maxFileSize' => file_upload_max_size()), 'debug' => $config->debug);
     });
 }
开发者ID:JoeMurray,项目名称:civihr,代码行数:12,代码来源:JobContractTab.php

示例2: hrvisa_civicrm_buildProfile

/**
 * Implementation of hook_civicrm_buildProfile
 */
function hrvisa_civicrm_buildProfile($name)
{
    if ($name == 'hrvisa_tab') {
        // To fix validation alert issue
        $smarty = CRM_Core_Smarty::singleton();
        $smarty->assign('urlIsPublic', FALSE);
        $contactID = CRM_Utils_Request::retrieve('id', 'Positive', $this);
        $config = CRM_Core_Config::singleton();
        if ($config->logging && 'multiProfileDialog' !== CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject)) {
            CRM_Core_Region::instance('profile-form-hrvisa_tab')->add(array('template' => 'CRM/common/logButton.tpl', 'instance_id' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'), 'css_class' => 'hrvisa-revision-link', 'table_name' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', 'Immigration', 'table_name', 'name'), 'contact_id' => $contactID, 'weight' => -2));
        }
    }
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:16,代码来源:hrvisa.php

示例3: hrqual_civicrm_buildProfile

/**
 * Implementation of hook_civicrm_buildProfile
 */
function hrqual_civicrm_buildProfile($name)
{
    if ($name == 'hrqual_tab') {
        // To fix validation alert issue
        $smarty = CRM_Core_Smarty::singleton();
        $smarty->assign('urlIsPublic', FALSE);
        $action = CRM_Utils_Request::retrieve('multiRecord', 'String', $this);
        // display the select box only in add and update mode
        if (in_array($action, array("add", "update"))) {
            $regionParams = array('markup' => "<select id='category_name' name='category_name' style='display:none' class='form-select required'></select>");
            CRM_Core_Region::instance('profile-form-hrqual_tab')->add($regionParams);
        }
        $config = CRM_Core_Config::singleton();
        if ($config->logging && 'multiProfileDialog' !== CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject)) {
            $contactID = CRM_Utils_Request::retrieve('id', 'Positive', $this);
            CRM_Core_Region::instance('profile-form-hrqual_tab')->add(array('template' => 'CRM/common/logButton.tpl', 'instance_id' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'), 'css_class' => 'hrqual-revision-link', 'table_name' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', 'Qualifications', 'table_name', 'name'), 'contact_id' => $contactID, 'weight' => -2));
        }
    }
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:22,代码来源:hrqual.php

示例4: registerScripts

 static function registerScripts()
 {
     static $loaded = FALSE;
     if ($loaded) {
         return;
     }
     $loaded = TRUE;
     CRM_Core_Resources::singleton()->addSettingsFactory(function () {
         $config = CRM_Core_Config::singleton();
         return array('PseudoConstant' => array('locationType' => CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'), 'job_hours_time' => CRM_HRJob_Page_JobsTab::getJobHoursTime(), 'working_days' => CRM_HRJob_Page_JobsTab::getDaysPerTime()), 'FieldOptions' => CRM_HRJob_Page_JobsTab::getFieldOptions(), 'jobTabApp' => array('contact_id' => CRM_Utils_Request::retrieve('cid', 'Integer'), 'domain_id' => CRM_Core_Config::domainID(), 'isLogEnabled' => (bool) $config->logging, 'loggingReportId' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'), 'currencies' => CRM_HRJob_Page_JobsTab::getCurrencyFormats(), 'defaultCurrency' => $config->defaultCurrency));
     })->addScriptFile('civicrm', 'packages/backbone/json2.js', 100, 'html-header', FALSE)->addScriptFile('civicrm', 'packages/backbone/backbone.js', 120, 'html-header')->addScriptFile('civicrm', 'packages/backbone/backbone.marionette.js', 125, 'html-header', FALSE)->addScriptFile('civicrm', 'packages/backbone/backbone.modelbinder.js', 125, 'html-header', FALSE)->addScriptFile('civicrm', 'js/jquery/jquery.crmRevisionLink.js', 125, 'html-header', FALSE)->addScriptFile('org.civicrm.hrjob', 'js/jquery/jquery.hrContactLink.js', 125, 'html-header', FALSE)->addScriptFile('org.civicrm.hrjob', 'js/jquery/jquery.hrFileLink.js', 125, 'html-header', FALSE)->addScriptFile('org.civicrm.hrjob', 'js/jquery/jquery.lockButton.js', 125, 'html-header', FALSE)->addScriptFile('civicrm', 'js/crm.backbone.js', 130, 'html-header', FALSE)->addStyleFile('org.civicrm.hrjob', 'css/hrjob.css', 140, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/hrapp.js', 150, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/renderutil.js', 155, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/entities/hrjob.js', 155, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/common/navigation.js', 155, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/common/mbind.js', 155, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/common/views.js', 155, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp.js', 160, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp/intro/show_controller.js', 160, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp/intro/show_views.js', 160, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp/tree/tree_controller.js', 160, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp/tree/tree_views.js', 160, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp/summary/summary_controller.js', 160, 'html-header')->addScriptFile('org.civicrm.hrjob', 'js/jobtabapp/summary/summary_views.js', 160, 'html-header');
     foreach (array('general', 'funding', 'health', 'hour', 'leave', 'pay', 'pension', 'role') as $module) {
         CRM_Core_Resources::singleton()->addScriptFile('org.civicrm.hrjob', "js/jobtabapp/{$module}/edit_controller.js", 160, 'html-header')->addScriptFile('org.civicrm.hrjob', "js/jobtabapp/{$module}/edit_views.js", 160, 'html-header')->addScriptFile('org.civicrm.hrjob', "js/jobtabapp/{$module}/summary_views.js", 160, 'html-header');
     }
     $templateDir = CRM_Extension_System::singleton()->getMapper()->keyToBasePath('org.civicrm.hrjob') . '/templates/';
     $region = CRM_Core_Region::instance('page-header');
     foreach (glob($templateDir . 'CRM/HRJob/Underscore/*.tpl') as $file) {
         $fileName = substr($file, strlen($templateDir));
         $region->add(array('template' => $fileName));
     }
     $region->add(array('template' => 'CRM/Form/validate.tpl'));
 }
开发者ID:JoeMurray,项目名称:civihr,代码行数:22,代码来源:JobsTab.php

示例5: postProcess

 /**
  * Process the form.
  */
 public function postProcess()
 {
     // store the submitted values in an array
     $status = '';
     $params = $this->controller->exportValues($this->_name);
     $params['id'] = $this->_surveyId;
     $updateResultSet = FALSE;
     $resultSetOptGrpId = NULL;
     if (CRM_Utils_Array::value('option_type', $params) == 2 && !empty($params['option_group_id'])) {
         $updateResultSet = TRUE;
         $resultSetOptGrpId = $params['option_group_id'];
     }
     $recontactInterval = array();
     if ($updateResultSet) {
         $optionValue = new CRM_Core_DAO_OptionValue();
         $optionValue->option_group_id = $resultSetOptGrpId;
         $optionValue->delete();
         $params['result_id'] = $resultSetOptGrpId;
     } else {
         $opGroupName = 'civicrm_survey_' . rand(10, 1000) . '_' . date('YmdHis');
         $optionGroup = new CRM_Core_DAO_OptionGroup();
         $optionGroup->name = $opGroupName;
         $optionGroup->title = $this->_values['title'] . ' Result Set';
         $optionGroup->is_active = 1;
         $optionGroup->save();
         $params['result_id'] = $optionGroup->id;
     }
     foreach ($params['option_value'] as $k => $v) {
         if (strlen(trim($v))) {
             $optionValue = new CRM_Core_DAO_OptionValue();
             $optionValue->option_group_id = $params['result_id'];
             $optionValue->label = $params['option_label'][$k];
             $optionValue->name = CRM_Utils_String::titleToVar($params['option_label'][$k]);
             $optionValue->value = trim($v);
             $optionValue->weight = $params['option_weight'][$k];
             $optionValue->is_active = 1;
             if (!empty($params['default_option']) && $params['default_option'] == $k) {
                 $optionValue->is_default = 1;
             }
             $optionValue->save();
             // using is_numeric since 0 is a valid value for option_interval
             if (is_numeric($params['option_interval'][$k])) {
                 $recontactInterval[$optionValue->label] = $params['option_interval'][$k];
             }
         }
     }
     $params['recontact_interval'] = serialize($recontactInterval);
     $survey = CRM_Campaign_BAO_Survey::create($params);
     // create report if required.
     if (!$this->_reportId && $survey->id && !empty($params['create_report'])) {
         $activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
         $activityStatus = array_flip($activityStatus);
         $this->_params = array('name' => "survey_{$survey->id}", 'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'], 'status_id_op' => 'eq', 'status_id_value' => $activityStatus['Scheduled'], 'survey_id_value' => array($survey->id), 'description' => ts('Detailed report for canvassing, phone-banking, walk lists or other surveys.'));
         //Default value of order by
         $this->_params['order_bys'] = array(1 => array('column' => 'sort_name', 'order' => 'ASC'));
         // for WalkList or default
         $displayFields = array('id', 'sort_name', 'result', 'street_number', 'street_name', 'street_unit', 'survey_response');
         if (CRM_Core_OptionGroup::getValue('activity_type', 'WalkList') == $this->_values['activity_type_id']) {
             $this->_params['order_bys'] = array(1 => array('column' => 'street_name', 'order' => 'ASC'), 2 => array('column' => 'street_number_odd_even', 'order' => 'ASC'), 3 => array('column' => 'street_number', 'order' => 'ASC'), 4 => array('column' => 'sort_name', 'order' => 'ASC'));
         } elseif (CRM_Core_OptionGroup::getValue('activity_type', 'PhoneBank') == $this->_values['activity_type_id']) {
             array_push($displayFields, 'phone');
         } elseif (CRM_Core_OptionGroup::getValue('activity_type', 'Survey') == $this->_values['activity_type_id'] || CRM_Core_OptionGroup::getValue('activity_type', 'Canvass') == $this->_values['activity_type_id']) {
             array_push($displayFields, 'phone', 'city', 'state_province_id', 'postal_code', 'email');
         }
         foreach ($displayFields as $key) {
             $this->_params['fields'][$key] = 1;
         }
         $this->_createNew = TRUE;
         $this->_id = CRM_Report_Utils_Report::getInstanceIDForValue('survey/detail');
         CRM_Report_Form_Instance::postProcess($this, FALSE);
         $query = "SELECT MAX(id) FROM civicrm_report_instance WHERE name = %1";
         $reportID = CRM_Core_DAO::singleValueQuery($query, array(1 => array("survey_{$survey->id}", 'String')));
         if ($reportID) {
             $url = CRM_Utils_System::url("civicrm/report/instance/{$reportID}", 'reset=1');
             $status = ts("A Survey Detail Report <a href='%1'>%2</a> has been created.", array(1 => $url, 2 => $this->_params['title']));
         }
     }
     if ($status) {
         // reset status as we don't want status set by Instance::postProcess
         $session = CRM_Core_Session::singleton();
         $session->getStatus(TRUE);
         // set new status
         CRM_Core_Session::setStatus($status, ts('Saved'), 'success');
     }
     parent::endPostProcess();
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:89,代码来源:Results.php

示例6: hrcareer_civicrm_buildProfile

/**
 * Implementation of hook_civicrm_buildProfile
 */
function hrcareer_civicrm_buildProfile($name)
{
    if ($name == 'hrcareer_tab') {
        $isDialog = 'multiProfileDialog' == CRM_Utils_Request::retrieve('context', 'String', CRM_Core_DAO::$_nullObject);
        // To fix validation alert issue
        $smarty = CRM_Core_Smarty::singleton();
        $smarty->assign('urlIsPublic', FALSE);
        if (!$isDialog) {
            CRM_Core_Region::instance('profile-form-hrcareer_tab')->add(array('weight' => -10, 'markup' => '<div class="help">' . ts('Like a CV or resume, Career History records the work and study that a person has undertaken before joining the organization.') . '</div>'));
        }
        $config = CRM_Core_Config::singleton();
        if ($config->logging && !$isDialog) {
            $contactID = CRM_Utils_Request::retrieve('id', 'Positive', $this);
            CRM_Core_Region::instance('profile-form-hrcareer_tab')->add(array('template' => 'CRM/common/logButton.tpl', 'instance_id' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'), 'css_class' => 'hrcareer-revision-link', 'table_name' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', 'Career', 'table_name', 'name'), 'contact_id' => $contactID, 'weight' => -2));
        }
    }
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:20,代码来源:hrcareer.php


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