| @@ 79-96 (lines=18) @@ | ||
| 76 | } |
|
| 77 | ||
| 78 | // Deal with the actions for a known subject |
|
| 79 | foreach ($notification->getActions() as $action) { |
|
| 80 | switch ($action->getLabel()) { |
|
| 81 | case 'accept': |
|
| 82 | $action->setParsedLabel( |
|
| 83 | (string) $l->t('Accept') |
|
| 84 | ) |
|
| 85 | ->setPrimary(true); |
|
| 86 | break; |
|
| 87 | ||
| 88 | case 'decline': |
|
| 89 | $action->setParsedLabel( |
|
| 90 | (string) $l->t('Decline') |
|
| 91 | ); |
|
| 92 | break; |
|
| 93 | } |
|
| 94 | ||
| 95 | $notification->addParsedAction($action); |
|
| 96 | } |
|
| 97 | return $notification; |
|
| 98 | ||
| 99 | default: |
|
| @@ 136-152 (lines=17) @@ | ||
| 133 | ); |
|
| 134 | } |
|
| 135 | ||
| 136 | foreach ($notification->getActions() as $action) { |
|
| 137 | switch ($action->getLabel()) { |
|
| 138 | case 'accept': |
|
| 139 | $action->setParsedLabel( |
|
| 140 | (string) $l->t('Accept') |
|
| 141 | ); |
|
| 142 | break; |
|
| 143 | ||
| 144 | case 'decline': |
|
| 145 | $action->setParsedLabel( |
|
| 146 | (string) $l->t('Decline') |
|
| 147 | ); |
|
| 148 | break; |
|
| 149 | } |
|
| 150 | ||
| 151 | $notification->addParsedAction($action); |
|
| 152 | } |
|
| 153 | ||
| 154 | return $notification; |
|
| 155 | } |
|
| @@ 254-268 (lines=15) @@ | ||
| 251 | '"%1$s" requested to transfer "%2$s" to you (%3$s)"', |
|
| 252 | $notification->getMessageParameters()) |
|
| 253 | ); |
|
| 254 | foreach ($notification->getActions() as $action) { |
|
| 255 | switch ($action->getLabel()) { |
|
| 256 | case 'accept': |
|
| 257 | $action->setParsedLabel( |
|
| 258 | (string) $l->t('Accept') |
|
| 259 | ); |
|
| 260 | break; |
|
| 261 | case 'reject': |
|
| 262 | $action->setParsedLabel( |
|
| 263 | (string) $l->t('Decline') |
|
| 264 | ); |
|
| 265 | break; |
|
| 266 | } |
|
| 267 | $notification->addParsedAction($action); |
|
| 268 | } |
|
| 269 | return $notification; |
|
| 270 | break; |
|
| 271 | case 'transfer_request_actioned_source': |
|