for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Starkerxp\CampaignBundle\Render;
class OctosendTxtRender extends OctosendHtmlRender
{
/**
* @var AbstractRender
*/
private $htmlToTxtService;
* OctosendTxtRender constructor.
*
* @param AbstractRender $htmlToTxtService
public function __construct(AbstractRender $htmlToTxtService)
$this->htmlToTxtService = $htmlToTxtService;
}
public function render()
$contenu = parent::render();
// On finit la conversion en convertissant le reste des élements html en txt
$this->htmlToTxtService->setContenu($contenu);
$contenu = $this->htmlToTxtService->render();
return $contenu;
public function getSupport($api, $version)
return strtolower($api) == 'octosend' && $version == 'txt';
protected function retournerLaChaine($type, $lien, $texte, $style = null)
if ($type == "unsub") {
return "[Désinscription] {{unsubscribe:".$lien."}}";
return (!empty($texte) && $texte != 'Lien' ? '['.$texte.']' : '').' {{click:'.$lien.'}}';
This check marks files that end in a newline character, i.e. an empy line.
This check marks files that end in a newline character, i.e. an empy line.