Monster_Page.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Monster view 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. * Monster view page model.
  16. *
  17. * @category Page
  18. */
  19. class Monster_Page extends Page{
  20. /**
  21. * @var Unit Selected Unit.
  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 . "monster.php";
  33. $this->unit = new Unit($id);
  34. $this->title = $this->unit->unit->name ." - SWDB";
  35. $this->description = "Owned " . $this->unit->unit->name;
  36. $this->canonical = URL::BASE . "monster/" . $id;
  37. }
  38. }
  39. ?>