Merge pull request #22 from Jagadees-zyxware/master
[com.zyxware.civiwci.git] / wci-helper-functions.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM Widget Creation Interface (WCI) Version 1.0 |
5 +--------------------------------------------------------------------+
6 | Copyright Zyxware Technologies (c) 2014 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM WCI. |
9 | |
10 | CiviCRM WCI is free software; you can copy, modify, and distribute |
11 | it under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007. |
13 | |
14 | CiviCRM WCI is distributed in the hope that it will be useful, |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License along with this program; if not, contact Zyxware |
21 | Technologies at info[AT]zyxware[DOT]com. |
22 +--------------------------------------------------------------------+
23 */
24
25 function getContributionPageOptions() {
26 $options = array(
27 0 => ts('- select -'),
28 );
29
30 $result = civicrm_api3('contribution_page', 'get');
31 foreach ($result['values'] as $contribution_page) {
32 $options[$contribution_page['id']] = $contribution_page['title'];
33 }
34
35 return $options;
36 }
37
38 function getWciWidgetTemplatePath() {
39 $widget_tpl_path = __DIR__ . '/templates/CRM/Wci/Page';
40
41 return $widget_tpl_path;
42 }