X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FWidget%2FWidget.php;h=dbc4afe80cce8294af82ba1585eac9d934ed25e5;hb=78db4a67712ee70f437b227968353576438ed36e;hp=29586c3658f18901f16886d393785deead19110f;hpb=a4aae59c25dd5823d17b107d3741925a343b0276;p=civicrm-core.git diff --git a/CRM/Widget/Widget.php b/CRM/Widget/Widget.php index 29586c3658..dbc4afe80c 100644 --- a/CRM/Widget/Widget.php +++ b/CRM/Widget/Widget.php @@ -11,29 +11,29 @@ */ 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( + ], + ], + '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', - ), - ), - ); + ], + ], + ]; } } @@ -109,7 +109,7 @@ FROM civicrm_contribution 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; @@ -123,7 +123,7 @@ AND contribution_page_id = %1"; 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; @@ -158,7 +158,7 @@ WHERE id = %1"; $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);