protected function sortToolbar()
{
if (empty($this->toolbarOrder)) {
return;
}
$sortedToolbar = [];
foreach ($this->toolbarOrder as $btnKey) {
if ($btnKey === self::BTN_SEPARATOR) {
$sortedToolbar[] = $btnKey;
} elseif (isset($this->toolbar[$btnKey])) {
$sortedToolbar[$btnKey] = $this->toolbar[$btnKey];
}
}
$this->toolbar = $sortedToolbar;
}