|
@@ 1514-1522 (lines=9) @@
|
| 1511 |
|
} |
| 1512 |
|
|
| 1513 |
|
// If I want to add a share block in my view |
| 1514 |
|
if ($game->getFbShareMessage()) { |
| 1515 |
|
$fbShareMessage = $game->getFbShareMessage(); |
| 1516 |
|
} else { |
| 1517 |
|
$fbShareMessage = str_replace( |
| 1518 |
|
'__placeholder__', |
| 1519 |
|
$game->getTitle(), |
| 1520 |
|
$this->getOptions()->getDefaultShareMessage() |
| 1521 |
|
); |
| 1522 |
|
} |
| 1523 |
|
|
| 1524 |
|
if ($game->getFbShareImage()) { |
| 1525 |
|
$fbShareImage = $this->frontendUrl()->fromRoute( |
|
@@ 1562-1570 (lines=9) @@
|
| 1559 |
|
); |
| 1560 |
|
} |
| 1561 |
|
|
| 1562 |
|
if ($game->getTwShareMessage()) { |
| 1563 |
|
$twShareMessage = $game->getTwShareMessage().$socialLinkUrl; |
| 1564 |
|
} else { |
| 1565 |
|
$twShareMessage = str_replace( |
| 1566 |
|
'__placeholder__', |
| 1567 |
|
$game->getTitle(), |
| 1568 |
|
$this->getOptions()->getDefaultShareMessage() |
| 1569 |
|
).$socialLinkUrl; |
| 1570 |
|
} |
| 1571 |
|
|
| 1572 |
|
$ogTitle = new \PlaygroundCore\Opengraph\Tag('og:title', $fbShareMessage); |
| 1573 |
|
$ogImage = new \PlaygroundCore\Opengraph\Tag('og:image', $fbShareImage); |