52 lines
1.4 KiB
PHP
52 lines
1.4 KiB
PHP
<?php
|
|
|
|
use KupShop\AdminBundle\Util\AdminSectionTree;
|
|
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
|
|
|
|
class BaseAdminSectionsRelations extends \Frame
|
|
{
|
|
protected $template = 'sectionsRelations.tpl';
|
|
|
|
protected AdminSectionTree $adminSectionTree;
|
|
|
|
protected string $label;
|
|
protected string $tableName;
|
|
protected string $column;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->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!');
|
|
}
|
|
}
|