// Transform the different types of notification in an usable array
switch ($notification['verb']) {
case Activity::LIKE:
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'like',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
break;
case Activity::DISLIKE:
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'dislike',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
break;
case Activity::ATTEND:
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'attend',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
break;
case Activity::ATTENDNO:
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'attendno',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
break;
case Activity::ATTENDMAYBE:
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'attendmaybe',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
case Activity::FRIEND:
if (!isset($notification['object'])) {
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'friend',
'link' => $default_item_link,
'image' => $default_item_image,
$obj = XML::parseString($xmlHead . $notification['object']);
$notification['fname'] = $obj->title;
- $formattedNotify = [
+ $formattedNotification = [
'label' => 'friend',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
break;
default:
- $formattedNotify = [
+ $formattedNotification = [
'label' => $default_item_label,
'link' => $default_item_link,
'image' => $default_item_image,
];
}
- $formattedNotifications[] = $formattedNotify;
+ $formattedNotifications[] = $formattedNotification;
}
return $formattedNotifications;