Optimizer_Unit_Page.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Optimizer unit page file.
  4. *
  5. * Provides a class with all the properties and methods to display the page.
  6. *
  7. * @category Page
  8. */
  9. /**
  10. * Require dependent files if not present.
  11. */
  12. require_once(PATH::PAGE . "Page.php");
  13. require_once(PATH::ENTITY . "Unit.php");
  14. /**
  15. * Optimizer team list page model.
  16. *
  17. * @category Page
  18. */
  19. class Optimizer_Unit_Page extends Page{
  20. /**
  21. * @var Unit The unit to optimize.
  22. */
  23. public $unit;
  24. /**
  25. * Constructor.
  26. *
  27. * Retrieves the data and initializes the variables.
  28. *
  29. * @param string $id Selected unit id
  30. */
  31. public function __construct($id){
  32. $this->view = PATH::VIEW . "optimizer_unit.php";
  33. $this->unit = new Unit($id);
  34. $this->title = "Optimize " . $this->unit->unit->name . " - SWDB";
  35. $this->description = "Optimize " . $this->unit->unit->name;
  36. $this->canonical = URL::BASE . "optmizer/$id";
  37. }
  38. }
  39. ?>