Skip to content
Snippets Groups Projects
Commit 004e650d authored by François Agneray's avatar François Agneray
Browse files

Modifications couleurs badges

parent 036746fb
No related branches found
No related tags found
No related merge requests found
......@@ -32,10 +32,15 @@ final class DashboardGenerateBadgeAction
return $response->write('Email invalide')->withStatus(400);
}
$role = strtolower($participant->getRole());
if ($role == 'invité') {
$role = 'invite';
}
// Parametres par defaut
$width = 890;
$height = 600;
$imagefile = './public/images/badge.png';
$imagefile = './public/images/badge_' . $role . '.png';
$fontroboto = './config/Roboto-Black.ttf';
$fontrobotolight = './config/Roboto-Light.ttf';
$fontTopSecret = './config/top_secret.ttf';
......@@ -51,7 +56,7 @@ final class DashboardGenerateBadgeAction
if ($participant->getEvenementSocial()) {
imagettftext($image, 25, 20, 75, 350, $black, $fontTopSecret, 'Event');
}
imagettftext($image, 40, 0, 255, 100, $black, $fontroboto, $participant->getPrenom());
imagettftext($image, 40, 0, 255, 100, $black, $fontroboto, ucfirst(strtolower($participant->getPrenom())));
imagettftext($image, 40, 0, 255, 160, $black, $fontroboto, strtoupper($participant->getNom()));
imagettftext($image, 29, 0, 255, 250, $black, $fontrobotolight, $participant->getOrganisme()->getLabel());
$roleString = $participant->getRole();
......
......@@ -70,10 +70,15 @@ final class DashboardGenerateBadgeListAction
private function createBadge($participant)
{
$role = strtolower($participant->getRole());
if ($role == 'invité') {
$role = 'invite';
}
// Parametres par defaut
$width = 890;
$height = 600;
$imagefile = './public/images/badge.png';
$imagefile = './public/images/badge_' . $role . '.png';
$fontroboto = './config/Roboto-Black.ttf';
$fontrobotolight = './config/Roboto-Light.ttf';
$fontTopSecret = './config/top_secret.ttf';
......@@ -89,7 +94,7 @@ final class DashboardGenerateBadgeListAction
if ($participant->getEvenementSocial()) {
imagettftext($image, 25, 20, 75, 350, $black, $fontTopSecret, 'Event');
}
imagettftext($image, 40, 0, 255, 100, $black, $fontroboto, $participant->getPrenom());
imagettftext($image, 40, 0, 255, 100, $black, $fontroboto, ucfirst(strtolower($participant->getPrenom())));
imagettftext($image, 40, 0, 255, 160, $black, $fontroboto, strtoupper($participant->getNom()));
imagettftext($image, 29, 0, 255, 250, $black, $fontrobotolight, $participant->getOrganisme()->getLabel());
$roleString = $participant->getRole();
......
public/images/badge_exposant.png

36.7 KiB

public/images/badge_invite.png

36.6 KiB

public/images/badge_organisateur.png

36.6 KiB

File moved
public/images/badge_sponsor.png

36.7 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment