version pour laura et besnik
This commit is contained in:
parent
024cf537ed
commit
4fd89380c0
6 changed files with 174 additions and 120 deletions
|
|
@ -3,7 +3,7 @@
|
|||
require("../app/entities/project_entity.php");
|
||||
|
||||
/**
|
||||
* Le controler des article
|
||||
* Le controler des Project
|
||||
* @author Yasser
|
||||
*/
|
||||
class ProjectCtrl{
|
||||
|
|
@ -29,4 +29,35 @@
|
|||
|
||||
}
|
||||
|
||||
public function search(){
|
||||
|
||||
// inclusion du header
|
||||
include('../app/views/partials/header.php');
|
||||
|
||||
//Récupérer les informations du Formulaire
|
||||
|
||||
// Récupération des Projects
|
||||
$objProjectModel = new ProjectModel;
|
||||
//$arrProject = findAll(0, $strKeywords, $intAuthor, $intPeriod, $strDate, $strStartDate, $strEndDate);
|
||||
// Depuis PHP 8 - accès direct aux paramètres
|
||||
$arrProject = $objProjectModel->findAll();
|
||||
|
||||
// Initialisation d'un tableau => objets
|
||||
$arrProjectToDisplay = array();
|
||||
// Boucle de transformation du tableau de tableau en tableau d'objets
|
||||
foreach($arrProject as $arrDetProject){
|
||||
$objProject = new Project;
|
||||
$objProject->hydrate($arrDetProject);
|
||||
|
||||
$arrProjectToDisplay[] = $objProject;
|
||||
}
|
||||
|
||||
// Récupération des utilisateurs
|
||||
require("../app/models/user_model.php");
|
||||
$objUserModel = new UserModel;
|
||||
$arrUser = $objUserModel->findAllUsers();
|
||||
|
||||
include('../app/views/search.php');
|
||||
include('../app/views/partials/footer.php');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue