* @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){ $this->view = PATH::VIEW . "optimizer_unit.php"; $this->unit = new Unit($id); $this->title = "Optimize " . $this->unit->get_title() . " - SWDB"; $this->description = "Optimize " . $this->unit->get_title(); $this->canonical = URL::BASE . "optimizer/$id"; } /** * Retrieves the unit to optimize. * * @return Unit Unit to optimize. */ public function get_unit(){ return $this->unit; } } ?>