public function setOrder(array $keys) {
        $this->itemsOrdered = [];

        foreach($keys as $label => $value) {
            if($value === 'spacer' || $value === '|') {
                $this->itemsOrdered[] = $this->spacer;
            } elseif(is_array($value)) {
                $parts = explode(',', $label);
                if($this->hasItem($parts[0])) {
                    $dropdown = new DropdownToolbarItem($parts[1]);
                    $dropdown->button = $this->getItem($parts[0]);
                } else {
                    $dropdown = new DropdownToolbarItem($parts[0]);
                }

                foreach($value as $dropdownItem) {
                    $dropdown->addItem($this->getItem($dropdownItem));
                }
                $this->itemsOrdered[] = $dropdown;
            } else {
                $this->itemsOrdered[] = $this->getItem($value);
            }
        }
    }