You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE4.01_FORMULAIRE/Source/Controller/ControllerAdmin.php

46 lines
905 B

<?php
namespace Controller;
use Model\ModelAdmin;
class ControllerAdmin
{
public function addQuestion(): void
{
global $rep, $views;
$idQuestion = (new ModelAdmin())->addQuestion();
$categories = (new ModelAdmin())->getCategories();
$questionContent = $_POST['question'];
$type = $_POST['type'];
require_once($rep.$views['possibleResponsesForm']);
}
public function addResponse(): void
{
}
public function createForm(): void
{
(new ModelAdmin())->createForm();
}
public function goToAdminPage(): void
{
global $rep, $views;
$categories = (new ModelAdmin())->getCategories();
$questions = (new ModelAdmin())->getQuestions();
require_once($rep.$views['admin']);
}
public function addKeyword(): void
{
(new ModelAdmin())->addKeyword();
}
}