當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。