|
|
@@ -0,0 +1,48 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace Opentalent\OtTemplating\ViewHelpers\Social;
|
|
|
+
|
|
|
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Returns the uri for a link that will share this page on Facebook
|
|
|
+ *
|
|
|
+ * {namespace ot=Opentalent\OtTemplating\ViewHelpers}
|
|
|
+ *
|
|
|
+ * {ot:social.facebookShareUri()}
|
|
|
+ *
|
|
|
+ * @package Opentalent\OtTemplating\ViewHelpers
|
|
|
+ */
|
|
|
+class FacebookShareUri
|
|
|
+{
|
|
|
+
|
|
|
+ /**
|
|
|
+ * -- This method is expected by Fluid --
|
|
|
+ * Declares the viewhelper's parameters
|
|
|
+ */
|
|
|
+ public function initializeArguments()
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * -- This method is expected by Fluid --
|
|
|
+ * Renders the content as html
|
|
|
+ *
|
|
|
+ * @param array $arguments
|
|
|
+ * @param Closure $renderChildrenClosure
|
|
|
+ * @param RenderingContextInterface $renderingContext
|
|
|
+ * @return int|null
|
|
|
+ */
|
|
|
+ public static function renderStatic(
|
|
|
+ array $arguments,
|
|
|
+ Closure $renderChildrenClosure,
|
|
|
+ RenderingContextInterface $renderingContext
|
|
|
+ ) {
|
|
|
+ $page = $GLOBALS['TSFE']->getAttribute('page');
|
|
|
+
|
|
|
+
|
|
|
+ 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";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|