last day (14 days later) » 

2:35 PM
0
A: What is the idea of | in twig

doydoy44| is to apply a Twig fliter. I guess you have a twitter_share_link function in your project which need url_article as parameter

 
What is the role of text_article| ?
How to transform this in php ?
 
text_article is the variable which is applied the twitter_share_link filter. you should seach twitter_share_link in the code of your project to understand the utility of this filter
How to transform this in php ? => Look this doc
 
@doydoy44....I edited the question...So the method get one parameter...But I don't understand how is use text_article
 
Are you sure that getShareLink() is the method of the twitter_share_link filter? if yes, I d'ont understand either.
 
Yes I'm sure
 
2:37 PM
Do you speak french?
 
Un peut oui
 
Le code que vous m'avez montré ne correspond pas à celui de la doc.
Je ne comprend pas comment est fait le lien entre le filtre et la méthode.
 
moi aussi, j'ai comprend pas l'idee
 
Avez vous quelque part ce type de code :
new \Twig_SimpleFilter('price', array($this, 'priceFilter')),
avec price = twitter_share_link et priceFilter = ...
 
je regarde
 
2:52 PM
Bon, j'ai ca :
new \Twig_SimpleFilter('googleplus_share_link', array('\SocialNetwork\GooglePlus', 'getShareLink')),
Et la methode getShareLink :
public static function getShareLink($s_url)
{
$a_params = array(
'url' => 'url',
'hl' => L10n::getInstance()->getLanguage()
);

return self::URL . http_build_query($a_params, '', '&');
}
 
c'est votre code ou est ce que ça vient d'un bundle externe?
 
c'est notre
 
Je ne comprend pas le rapport entre le code de la fonction getShareLink et son paramètre.
désolé mais je ne sais pas quoi vous répondre.
je ne comprend pas non plus.
 
d'acc
merci
 
Bon courage. :)
 

last day (14 days later) »