FacebookShareUri.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Opentalent\OtTemplating\ViewHelpers\Social;
  3. use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
  4. /**
  5. * Returns the uri for a link that will share this page on Facebook
  6. *
  7. * {namespace ot=Opentalent\OtTemplating\ViewHelpers}
  8. *
  9. * {ot:social.facebookShareUri()}
  10. *
  11. * @package Opentalent\OtTemplating\ViewHelpers
  12. */
  13. class FacebookShareUri
  14. {
  15. /**
  16. * -- This method is expected by Fluid --
  17. * Declares the viewhelper's parameters
  18. */
  19. public function initializeArguments()
  20. {
  21. }
  22. /**
  23. * -- This method is expected by Fluid --
  24. * Renders the content as html
  25. *
  26. * @param array $arguments
  27. * @param Closure $renderChildrenClosure
  28. * @param RenderingContextInterface $renderingContext
  29. * @return int|null
  30. */
  31. public static function renderStatic(
  32. array $arguments,
  33. Closure $renderChildrenClosure,
  34. RenderingContextInterface $renderingContext
  35. ) {
  36. $page = $GLOBALS['TSFE']->getAttribute('page');
  37. return "http://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.la-francaise.com%2Ffr%2Fnous-connaitre%2Fles-actualites%2Fdetail%2Fconfirmation-du-biais-dovish-de-la-fed-des-taux-plus-eleves-pas-d-inquietude%2F&t=Confirmation%20du%20biais%20dovish%20de%20la%20FED%20%3A%20des%20taux%20plus%20%C3%A9lev%C3%A9s%20%3F%20Pas%20d%27inqui%C3%A9tude%20!%20-%20Groupe%20La%20Fran%C3%A7aise";
  38. }
  39. }