X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FWidget%2FWidget.php;h=cf22c5933391a883f757236b76c566824a2c7a69;hb=c3d2bf84c6cd14ef48f719df9c323e04daa874ab;hp=364c6a0956e1fc4e1a3c14eb3e5ae09bee4925ba;hpb=68acd6ae8e764d8e713829675cfadfdefff770e8;p=civicrm-core.git
diff --git a/CRM/Widget/Widget.php b/CRM/Widget/Widget.php
index 364c6a0956..cf22c59333 100644
--- a/CRM/Widget/Widget.php
+++ b/CRM/Widget/Widget.php
@@ -12,11 +12,11 @@
class CRM_Widget_Widget {
static $_methodTable;
- function initialize() {
+
+ public function initialize() {
if (!self::$_methodTable) {
self::$_methodTable = array(
- 'getContributionPageData' =>
- array(
+ 'getContributionPageData' => array(
'description' => 'Gets all campaign related data and returns it as a std class.',
'access' => 'remote',
'arguments' => array(
@@ -24,8 +24,7 @@ class CRM_Widget_Widget {
'widgetID',
),
),
- 'getEmbedCode' =>
- array(
+ '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.',
'access' => 'remote',
'arguments' => array(
@@ -38,7 +37,7 @@ class CRM_Widget_Widget {
}
}
- function &methodTable() {
+ public function &methodTable() {
self::initialize();
return self::$_methodTable;
@@ -53,7 +52,7 @@ class CRM_Widget_Widget {
*
* @return string
*/
- function registerRequest($contributionPageID, $widgetID, $action) {
+ public function registerRequest($contributionPageID, $widgetID, $action) {
return "I registered a request to $action on $contributionPageID from $widgetID";
}
@@ -63,7 +62,7 @@ class CRM_Widget_Widget {
* @param int $contributionPageID
* @param string $widgetID
*
- * @return stdClass
+ * @return object
*/
public function getContributionPageData($contributionPageID, $widgetID) {
$config = CRM_Core_Config::singleton();
@@ -93,11 +92,11 @@ class CRM_Widget_Widget {
$data->is_active = FALSE;
}
- $data->is_active = TRUE;
- $data->title = $widget->title;
- $data->logo = $widget->url_logo;
+ $data->is_active = TRUE;
+ $data->title = $widget->title;
+ $data->logo = $widget->url_logo;
$data->button_title = $widget->button_title;
- $data->button_url = CRM_Utils_System::url('civicrm/contribute/transact',
+ $data->button_url = CRM_Utils_System::url('civicrm/contribute/transact',
"reset=1&id=$contributionPageID",
TRUE, NULL, FALSE, TRUE
);
@@ -184,13 +183,15 @@ WHERE id = %1";
*
* @param int $contributionPageID
* @param string $widgetID
- * @param string $format - either myspace or normal
+ * @param string $format
+ * Either myspace or normal.
*
* @return string
*/
public function getEmbedCode($contributionPageID, $widgetID, $format = "normal") {
self::registerRequest($contributionPageID, $widgetID, __FUNCTION__);
- return "" . print_r(func_get_args(), 1);
+ return "" .
+ print_r(func_get_args(), 1);
}
-}
+}