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


PHP CRM_Financial_BAO_FinancialType::buildPermissionedClause方法代码示例

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


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

示例1: testBuildPermissionedClause

 /**
  * Check method testisACLFinancialTypeStatus()
  */
 public function testBuildPermissionedClause()
 {
     $this->setACL();
     $this->setPermissions(array('view contributions of type Donation', 'view contributions of type Member Dues'));
     CRM_Financial_BAO_FinancialType::buildPermissionedClause($whereClause, 'contribution');
     $this->assertEquals($whereClause, ' civicrm_contribution.financial_type_id IN (1,2)');
     $this->setPermissions(array('view contributions of type Donation', 'view contributions of type Member Dues', 'view contributions of type Event Fee'));
     $whereClause = NULL;
     CRM_Financial_BAO_FinancialType::buildPermissionedClause($whereClause, 'contribution');
     $this->assertEquals($whereClause, ' civicrm_contribution.financial_type_id IN (1,4,2)');
 }
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:14,代码来源:FinancialTypeTest.php

示例2: initialize

 /**
  * Function which actually does all the work for the constructor.
  */
 public function initialize()
 {
     $this->_select = array();
     $this->_element = array();
     $this->_tables = array();
     $this->_whereTables = array();
     $this->_where = array();
     $this->_qill = array();
     $this->_options = array();
     $this->_cfIDs = array();
     $this->_paramLookup = array();
     $this->_having = array();
     $this->_customQuery = NULL;
     // reset cached static variables - CRM-5803
     self::$_activityRole = NULL;
     self::$_considerCompActivities = NULL;
     self::$_withContactActivitiesOnly = NULL;
     $this->_select['contact_id'] = 'contact_a.id as contact_id';
     $this->_element['contact_id'] = 1;
     $this->_tables['civicrm_contact'] = 1;
     if (!empty($this->_params)) {
         $this->buildParamsLookup();
     }
     $this->_whereTables = $this->_tables;
     $this->selectClause();
     $this->_whereClause = $this->whereClause();
     if (array_key_exists('civicrm_contribution', $this->_whereTables)) {
         $component = 'contribution';
     }
     if (array_key_exists('civicrm_membership', $this->_whereTables)) {
         $component = 'membership';
     }
     if (isset($component)) {
         CRM_Financial_BAO_FinancialType::buildPermissionedClause($this->_whereClause, $component);
     }
     $this->_fromClause = self::fromClause($this->_tables, NULL, NULL, $this->_primaryLocation, $this->_mode);
     $this->_simpleFromClause = self::fromClause($this->_whereTables, NULL, NULL, $this->_primaryLocation, $this->_mode);
     $this->openedSearchPanes(TRUE);
 }
开发者ID:hazemtorab,项目名称:civicrm-core,代码行数:42,代码来源:Query.php

示例3: testbuildPermissionedClause

 /**
  * Check method testisACLFinancialTypeStatus()
  */
 public function testbuildPermissionedClause()
 {
     $this->setACL();
     $config =& CRM_Core_Config::singleton();
     $config->userPermissionClass->permissions = array('view contributions of type Donation', 'view contributions of type Member Dues');
     CRM_Financial_BAO_FinancialType::buildPermissionedClause($whereClause, 'contribution');
     $this->assertEquals($whereClause, ' civicrm_contribution.financial_type_id IN (1,2)');
     $config->userPermissionClass->permissions[] = 'view contributions of type Event Fee';
     $whereClause = NULL;
     CRM_Financial_BAO_FinancialType::$_availableFinancialTypes = array();
     CRM_Financial_BAO_FinancialType::buildPermissionedClause($whereClause, 'contribution');
     $this->assertEquals($whereClause, ' civicrm_contribution.financial_type_id IN (1,4,2)');
 }
开发者ID:scardinius,项目名称:civicrm-core,代码行数:16,代码来源:FinancialTypeTest.php


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