public function OnPageInit()
 {
     # create edit control
     $this->editor = new TournamentEditControl($this->GetSettings());
     $this->editor->SetShowStepNumber(true);
     $this->RegisterControlForValidation($this->editor);
 }
 function OnPageInit()
 {
     $this->adding = (isset($_GET['action']) and $_GET['action'] === "add");
     # new data managers
     $this->match_manager = new MatchManager($this->GetSettings(), $this->GetDataConnection());
     # new edit control
     $this->editor = new TournamentSeasonsControl($this->GetSettings());
     $this->editor->SetCssClass('panel');
     $this->editor->SetShowStepNumber($this->adding);
     $this->RegisterControlForValidation($this->editor);
     # check permissions
     $this->b_user_is_match_admin = AuthenticationManager::GetUser()->Permissions()->HasPermission(PermissionType::MANAGE_MATCHES);
     # run template method
     parent::OnPageInit();
 }