| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- /**
- * Optimizer unit page file.
- *
- * Provides a class with all the properties and methods to display the page.
- *
- * @author Iñigo Valentin <i@inigovalentin.com>
- * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
- * @package SWDB
- */
- require_once(PATH::PAGE . "Page.php");
- require_once(PATH::ENTITY . "Unit.php");
- /**
- * Optimizer team list page model.
- *
- * @category Page
- */
- class Optimizer_Unit_Page extends Page{
- /**
- * @var Unit The unit to optimize.
- */
- private $unit;
- /**
- * Constructor.
- *
- * Retrieves the data and initializes the variables.
- *
- * @param string $id Selected unit id.
- */
- public function __construct($id){
- parent::__construct();
- $this->set_public(false);
- $this->set_view("optimizer_unit.php");
- $this->unit = new Unit($id);
- $this->set_title("Optimize " . $this->unit->get_title());
- $this->set_description("Optimize " . $this->unit->get_title() . "'s runes");
- $this->set_canonical(get_context()->get_player()->get_id() . "/optimize/" . $this->unit->get_id());
- $this->add_css("optimizer.css");
- $this->set_code(200);
- $this->set_message("OK");
- }
- /**
- * Retrieves the unit to optimize.
- *
- * @return Unit Unit to optimize.
- */
- public function get_unit(){
- return $this->unit;
- }
- }
- ?>
|