Commit | Line | Data |
---|---|---|
88583b52 J |
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 | } | |
c68d158b M |
15 | |
16 | function getExtensionRootPath() { | |
e242dd86 | 17 | return 'http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'], '', __DIR__); |
c68d158b M |
18 | } |
19 | ||
20 | function getWciWidgetControllerPath() { | |
21 | $widget_controller_path = getExtensionRootPath() . '/extern/wciwidget.php'; | |
22 | ||
23 | return $widget_controller_path; | |
24 | } | |
25 | ||
26 | function getWciWidgetTemplatePath() { | |
c311490a | 27 | $widget_tpl_path = __DIR__ . '/templates/CRM/Wci/Page'; |
c68d158b M |
28 | |
29 | return $widget_tpl_path; | |
799ffc5a | 30 | } |