remove obsolete code
This commit is contained in:
parent
ff923ab3a4
commit
b9996d942d
@ -48,8 +48,7 @@ class ComplaintController extends AbstractController
|
|||||||
{
|
{
|
||||||
$isSubmitted = null;
|
$isSubmitted = null;
|
||||||
}
|
}
|
||||||
$headerFile = Yaml::parseFile('../config/portalLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
return $this->render('complaint.html.twig',['form' => $form, 'isSubmitted' => $isSubmitted]);
|
||||||
return $this->render('complaint.html.twig',['header' => $headerFile, 'form' => $form, 'isSubmitted' => $isSubmitted]);
|
|
||||||
}
|
}
|
||||||
public function sendEmail(TransportTransportInterface $mailer, string $message, LoggerInterface $log) : bool
|
public function sendEmail(TransportTransportInterface $mailer, string $message, LoggerInterface $log) : bool
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,15 +17,12 @@ class SafetyController extends AbstractController
|
|||||||
#[Route('/training/safety', name: 'safetyHome')]
|
#[Route('/training/safety', name: 'safetyHome')]
|
||||||
public function Index() : Response
|
public function Index() : Response
|
||||||
{
|
{
|
||||||
$headerFile = Yaml::parseFile('../config/portalLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
|
||||||
$contentFile = Yaml::parseFile('../config/safetyLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
$contentFile = Yaml::parseFile('../config/safetyLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
||||||
return $this->render('Training/Safety/safetyHome.html.twig',['header' => $headerFile, 'content' => $contentFile]);
|
return $this->render('Training/Safety/safetyHome.html.twig',['content' => $contentFile]);
|
||||||
}
|
}
|
||||||
#[Route('/training/safety/quiz')]
|
#[Route('/training/safety/quiz')]
|
||||||
public function Quiz(Request $request, LoggerInterface $log)
|
public function Quiz(Request $request, LoggerInterface $log)
|
||||||
{
|
{
|
||||||
$headerFile = Yaml::parseFile('../config/portalLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
|
||||||
|
|
||||||
$form = $this->createForm(SafetyQuizType::class);
|
$form = $this->createForm(SafetyQuizType::class);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
if($form->isSubmitted() && $form->isValid())
|
if($form->isSubmitted() && $form->isValid())
|
||||||
@ -43,10 +40,10 @@ class SafetyController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$log->Debug($testerName . ' quiz answers correct: ' . $correctAnswers);
|
$log->Debug($testerName . ' quiz answers correct: ' . $correctAnswers);
|
||||||
return $this->render('Training/Safety/quizResults.html.twig', ['header'=>$headerFile, 'testerName'=>$testerName,
|
return $this->render('Training/Safety/quizResults.html.twig', ['testerName'=>$testerName,
|
||||||
'correctAnswers'=>$correctAnswers, 'totalAnswers'=>count($data)]);
|
'correctAnswers'=>$correctAnswers, 'totalAnswers'=>count($data)]);
|
||||||
}
|
}
|
||||||
return $this->render('Training/Safety/SafetyQuiz.html.twig',['header' => $headerFile, 'quiz'=>$form]);
|
return $this->render('Training/Safety/SafetyQuiz.html.twig',['quiz'=>$form]);
|
||||||
}
|
}
|
||||||
#[Route('/Training/Safety/Topics/{topic?}')]
|
#[Route('/Training/Safety/Topics/{topic?}')]
|
||||||
public function Topics(?string $topic) : Response
|
public function Topics(?string $topic) : Response
|
||||||
@ -56,21 +53,7 @@ class SafetyController extends AbstractController
|
|||||||
{
|
{
|
||||||
return $this->redirectToRoute('safetyHome');
|
return $this->redirectToRoute('safetyHome');
|
||||||
}
|
}
|
||||||
$headerFile = Yaml::parseFile('../config/portalLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
|
||||||
$topicsFile = Yaml::parseFile('../config/safetyLinks.yaml', 2, 2, Yaml::PARSE_OBJECT_FOR_MAP);
|
|
||||||
$topic = strtolower($topic);
|
$topic = strtolower($topic);
|
||||||
return $this->render('Training/Safety/Topics/'.$topic.".html.twig", ['headerFile'=> $headerFile]);
|
return $this->render('Training/Safety/Topics/'.$topic.".html.twig");
|
||||||
/* //Scan through each link file If we see what we need, then let's get it.
|
|
||||||
foreach($topicsFile['Cards'] as $card)
|
|
||||||
{
|
|
||||||
foreach($card as $item)
|
|
||||||
{
|
|
||||||
if($item['url']== $topic)
|
|
||||||
{
|
|
||||||
return $this->render('Training/Safety/Topics/'.$topic.".html.twig", ['headerFile'=> $headerFile]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user