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


PHP CRM_Utils_System::accessCiviContribute方法代码示例

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


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

示例1: setShowHide

 /**
  * Fix what blocks to show/hide based on the default values set
  *
  * @param    array    array of Group Titles
  * @param    array    array of Group Collapse Display 
  *
  * @return   
  *
  * @access   protected
  */
 function setShowHide(&$groupTitle)
 {
     if (empty($groupTitle)) {
         return;
     }
     $showHide =& new CRM_Core_ShowHideBlocks('', '');
     foreach ($groupTitle as $key => $title) {
         $showBlocks = $title . '[show]';
         $hideBlocks = $title;
         $showHide->addHide($hideBlocks);
         $showHide->addShow($showBlocks);
     }
     if (CRM_Utils_System::accessCiviContribute()) {
         $showHide->addHide('contributeForm');
         $showHide->addShow('contributeForm[show]');
     }
     $showHide->addToTemplate();
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:28,代码来源:Advanced.php

示例2: setShowHide

 /**
  * Show hide blocks based on default values.
  *
  * @param array (reference) $defaults
  * @return void
  * @access public
  */
 function setShowHide(&$defaults)
 {
     require_once 'CRM/Core/ShowHideBlocks.php';
     $showHide =& new CRM_Core_ShowHideBlocks(array('commPrefs' => 1, 'notes[show]' => 1, 'relationships[show]' => 1, 'groups[show]' => 1, 'openActivities[show]' => 1, 'activityHx[show]' => 1), array('notes' => 1, 'commPrefs[show]' => 1, 'relationships' => 1, 'groups' => 1, 'openActivities' => 1, 'activityHx' => 1));
     $config =& CRM_Core_Config::singleton();
     if (CRM_Utils_System::accessCiviContribute()) {
         $showHide->addShow('contributions[show]');
         $showHide->addHide('contributions');
     }
     if ($defaults['contact_type'] == 'Individual') {
         // is there any demographics data?
         if (CRM_Utils_Array::value('gender_id', $defaults) || CRM_Utils_Array::value('is_deceased', $defaults) || CRM_Utils_Array::value('birth_date', $defaults)) {
             $showHide->addShow('demographics');
             $showHide->addHide('demographics[show]');
         } else {
             $showHide->addShow('demographics[show]');
             $showHide->addHide('demographics');
         }
     }
     if (array_key_exists('location', $defaults)) {
         $numLocations = count($defaults['location']);
         if ($numLocations > 0) {
             $showHide->addShow('location[1]');
             $showHide->addHide('location[1][show]');
         }
         for ($i = 1; $i < $numLocations; $i++) {
             $locationIndex = $i + 1;
             $showHide->addShow("location[{$locationIndex}][show]");
             $showHide->addHide("location[{$locationIndex}]");
         }
     }
     $showHide->addToTemplate();
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:40,代码来源:Basic.php


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