#29801 - Changed Wci settings variable group name.
[com.zyxware.civiwci.git] / wci-helper-functions.php
1 <?php
2
3 function getContributionPageOptions() {
4 $options = array(
5 '' => ts('- select -'),
6 );
7
8 $result = civicrm_api3('contribution_page', 'get');
9 foreach ($result['values'] as $contribution_page) {
10 $options[$contribution_page['id']] = $contribution_page['title'];
11 }
12
13 return $options;
14 }
15
16 function getExtensionRootPath() {
17 return 'http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'], '', __DIR__);
18 }
19
20 function getWciWidgetControllerPath() {
21 $widget_controller_path = getExtensionRootPath() . '/extern/wciwidget.php';
22
23 return $widget_controller_path;
24 }
25
26 function getWciWidgetTemplatePath() {
27 $widget_tpl_path = __DIR__ . '/templates/CRM/Wci/Page';
28
29 return $widget_tpl_path;
30 }