Skip to content

Commit

Permalink
🔥 #268 removendo metodo
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Oct 8, 2023
1 parent 6296f95 commit 0381fd6
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions FormDin5/lib/widget/FormDin5/helpers/StringHelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,24 +389,4 @@ public static function string2SnakeCase($string)
$string = preg_replace('/[-]/', '_', $string);
return $string;
}

/**
* Gera um link para API do WhatsApp
*
* @param string $numeroTelefone - formatado ou não com DDI e DDD
* @param string $msg - mensagem que vai aparecer
* @param boolean $iconeVerde - default é o icone verde
* @return void
*/
public static function linkApiWhatsApp($numeroTelefone,$msg,$iconeVerde=true)
{
$numeroLimpo = str_replace([' ','-','(',')','+'],['','','','',''], $numeroTelefone);
$icon = "<i class='fab fa-whatsapp green' aria-hidden='true'></i>";
if($iconeVerde==false){
$icon = "<i class='fab fa-whatsapp' aria-hidden='true'></i>";
}
$link = "{$icon} <a target='newwindow' href='https://api.whatsapp.com/send?phone={$numeroLimpo}&text={$msg}'> {$numeroTelefone} </a>";
return $link;
}

}

0 comments on commit 0381fd6

Please sign in to comment.