*/
class CRM_Widget_Widget {
- static $_methodTable;
+ public static $_methodTable;
public function initialize() {
if (!self::$_methodTable) {
- self::$_methodTable = array(
- 'getContributionPageData' => array(
+ self::$_methodTable = [
+ 'getContributionPageData' => [
'description' => 'Gets all campaign related data and returns it as a std class.',
'access' => 'remote',
- 'arguments' => array(
+ 'arguments' => [
'contributionPageID',
'widgetID',
- ),
- ),
- 'getEmbedCode' => array(
- 'description' => 'Gets embed code. Perhaps overkill, but we can track dropoffs in this case. by # of people reqeusting emebed code / number of unique instances.',
+ ],
+ ],
+ 'getEmbedCode' => [
+ 'description' => 'Gets embed code. Perhaps overkill, but we can track dropoffs in this case. by # of people requesting embed code / number of unique instances.',
'access' => 'remote',
- 'arguments' => array(
+ 'arguments' => [
'contributionPageID',
'widgetID',
'format',
- ),
- ),
- );
+ ],
+ ],
+ ];
}
}
WHERE is_test = 0
AND contribution_status_id = 1
AND contribution_page_id = %1";
- $params = array(1 => array($contributionPageID, 'Integer'));
+ $params = [1 => [$contributionPageID, 'Integer']];
$dao = CRM_Core_DAO::executeQuery($query, $params);
if ($dao->fetch()) {
$data->num_donors = $dao->count;
SELECT goal_amount, start_date, end_date, is_active
FROM civicrm_contribution_page
WHERE id = %1";
- $params = array(1 => array($contributionPageID, 'Integer'));
+ $params = [1 => [$contributionPageID, 'Integer']];
$dao = CRM_Core_DAO::executeQuery($query, $params);
if ($dao->fetch()) {
$data->money_target = $dao->goal_amount;
$data->homepage_link = $widget->url_homepage;
// movie clip colors, must be in '0xRRGGBB' format
- $data->colors = array();
+ $data->colors = [];
$hexPrefix = '0x';
$data->colors["title"] = str_replace('#', $hexPrefix, $widget->color_title);
return "<embed>.......................</embed>" .
print_r(func_get_args(), 1);
}
+
}