protected function buildTree(array &$aItems, int $iParentId = null): array
    {
        $aTemp         = [];
        $sIdColumn     = $this->getColumn('id');
        $sParentColumn = $this->getColumn('parent_id', 'parent_id');
        foreach ($aItems as $oItem) {
            if ($oItem->{$sParentColumn} == $iParentId) {
                $oItem->children = $this->buildTree($aItems, $oItem->{$sIdColumn});
                $aTemp[]         = $oItem;
            }
        }

        return $aTemp;
    }