|
@@ 138-148 (lines=11) @@
|
| 135 |
|
'layout' => 'button_count', |
| 136 |
|
); |
| 137 |
|
|
| 138 |
|
if ($action == "share") { |
| 139 |
|
$parameters['url'] = array_key_exists('url', $parameters) ? $parameters['url'] : null; |
| 140 |
|
$parameters['action'] = 'fb-like'; |
| 141 |
|
|
| 142 |
|
} elseif ($action == "follow") { |
| 143 |
|
$parameters['url'] = $this->container->getParameter("azine_social_bar_fb_profile_url"); |
| 144 |
|
$parameters['action'] = "fb-follow"; |
| 145 |
|
|
| 146 |
|
} else { |
| 147 |
|
throw new \Exception("Unknown social action. Only 'share' and 'follow' are known at the moment."); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
return $this->container->get('azine.socialBarHelper')->facebookButton($parameters); |
| 151 |
|
} |
|
@@ 222-232 (lines=11) @@
|
| 219 |
|
'counterLocation' => 'right', |
| 220 |
|
); |
| 221 |
|
|
| 222 |
|
if ($action == "share") { |
| 223 |
|
$parameters['action'] = 'IN/Share'; |
| 224 |
|
$parameters['url'] = array_key_exists('url', $parameters) ? $parameters['url'] : null; |
| 225 |
|
|
| 226 |
|
} elseif ($action == "follow") { |
| 227 |
|
$parameters['action'] = 'IN/FollowCompany'; |
| 228 |
|
$parameters['companyId'] = $this->container->getParameter("azine_social_bar_linked_in_company_id"); |
| 229 |
|
|
| 230 |
|
} else { |
| 231 |
|
throw new \Exception("Unknown social action. Only 'share' and 'follow' are known at the moment."); |
| 232 |
|
} |
| 233 |
|
|
| 234 |
|
return $this->container->get('azine.socialBarHelper')->linkedInButton($parameters); |
| 235 |
|
} |