adminSectionTree = ServiceContainer::getService(AdminSectionTree::class); } public function get_vars() { $vars = parent::get_vars(); $pageVars['tree'] = $this->adminSectionTree->getCategories(); $pageVars['category0'] = $this->adminSectionTree->getCategory0(); $pageVars['selected'] = $this->adminSectionTree->getSelected($this->getID(), $this->tableName, $this->label, $this->column); $this->adminSectionTree->getOpened($pageVars['tree']); $pageVars['opened'] = $this->adminSectionTree->opened; $vars['body'] = $pageVars; $vars['body']['data']['id'] = $this->getID(); $vars['body']['ID'] = $this->getID(); return $vars; } public function handle() { parent::handle(); if (getVal('isSubmitted')) { $this->handleSubmit(); } } protected function handleSubmit(): void { throw new \RuntimeException('Not implemented!'); } }