Player_Page.php 1019 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Home page file.
  4. *
  5. * Provides a class with all the properties and methods to display the page.
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package SWDB
  10. */
  11. require_once(PATH::PAGE . "Page.php");
  12. require_once(PATH::ENTITY . "Player.php");
  13. /**
  14. * Home page model.
  15. *
  16. * @category Page
  17. */
  18. class Player_Page extends Page{
  19. /**
  20. * Constructor.
  21. *
  22. * Retrieves the data and initializes the variables.
  23. */
  24. public function __construct(){
  25. parent::__construct();
  26. $this->set_public(true);
  27. $this->set_view("player.php");
  28. $this->set_title(get_context()->get_player()->get_name());
  29. $this->set_description(get_context()->get_player()->get_name() . "'s profile");
  30. $this->set_canonical("player/" . get_context()->get_player()->get_id());
  31. $this->add_css("player.css");
  32. $this->set_code(200);
  33. $this->set_message("OK");
  34. }
  35. }