public static function mtree($control)
    {
        if (count($control->property->arrayItems)) {
            $key = '3';
            $data = '0,1,2,3,4,5';
            $tree = MUtil::arrayTree($control->property->arrayItems, $key, $data);
            $control->property->items = $tree;
        }
        $id = $control->property->id;
        $tree = $control->property->items;
        if ($control->property->checkbox != NULL) {
            $control->options->checkbox = $control->property->checkbox;
        }
        $control->plugin = 'tree';
        $internal = self::mtreeTransverse($tree, $tree['root']);
        $data = "[{$internal}]";
        $control->options->data = (object) $data;
        $event = str_replace('#action#', 'node.action', $event);
        $onSelect = $control->property->onSelect;
        if ($onSelect != '') {
            $onSelect = <<<EOT
    function(node) { 
        {$onSelect}
    }
EOT;
        } else {
            $onSelect = <<<EOT
    function(node) { 
        console.log(node);
        if (node.action != '') {
            console.log(node.action);
            manager.doAction(node.action);
        }
    }
EOT;
        }
        $control->options->onSelect = (object) $onSelect;
        self::setPluginClass($control);
        //self::createJS($control);
        $attributes = self::getAttributes($control);
        $html = "<ul {$attributes}></ul>";
        return $html;
    }