Projects.php 630 B

12345678910111213141516171819202122
  1. <?php
  2. class Projects extends Controller {
  3. public function Index($params) {
  4. return new View("Projects/index.view");
  5. }
  6. public function Manage($params){
  7. return new View("Projects/manage.view");
  8. }
  9. public function Create($params){
  10. Breadcrumbs::Add("Create", "/projects/create");
  11. $project=new Project();
  12. if (isset($params['submitProject'])){
  13. $project->ProjectTitle=$params['title'];
  14. $project->ProjectDescription=$params['description'];
  15. if (isset($params['type']))
  16. $project->ProjectType=$params['type'];
  17. }
  18. return new View("Projects/create.view",array("project"=>$project));
  19. }
  20. }