L1fieldName = 'id_os'; $this->L1fieldNameSql = 'ta.id_os'; $this->L1extraFields = [ 'tco.name', 'tco.id_os AS id', 'tco.icon_name AS iconHTML', ]; $this->L1inner = 'INNER JOIN tconfig_os tco ON tco.id_os = x2.g'; $this->L1orderByFinal = 'tco.name'; $this->L2condition = 'AND ta.id_os = '.$this->rootID; } protected function getData() { if ($this->id == -1) { $this->getFirstLevel(); } else if ($this->type == 'os') { $this->getSecondLevel(); } else if ($this->type == 'agent') { $this->getThirdLevel(); } } }