/** * @param CAdminTabEngine $customTabber */ function AddTabs(&$customTabber) { $this->customTabber = $customTabber; $arCustomTabs = $this->customTabber->GetTabs(); if ($arCustomTabs && is_array($arCustomTabs)) { $arTabs = array(); $i = 0; foreach ($this->tabs as $value) { foreach ($arCustomTabs as $key1 => $value1) { if (array_key_exists("SORT", $value1) && IntVal($value1["SORT"]) == $i) { $arTabs[] = array_merge($value1, array("CUSTOM" => "Y")); unset($arCustomTabs[$key1]); } } $arTabs[] = $value; $i++; } foreach ($arCustomTabs as $value1) $arTabs[] = array_merge($value1, array("CUSTOM" => "Y")); $this->tabs = $arTabs; } }
/** * @param CAdminTabEngine $customTabber */ function AddTabs(&$customTabber) { $this->customTabber = $customTabber; $arCustomTabs = $this->customTabber->GetTabs(); if ($arCustomTabs && is_array($arCustomTabs)) { $arTabs = array(); $i = 0; foreach ($this->tabs as $value) { foreach ($arCustomTabs as $key1 => $value1) { if (array_key_exists("SORT", $value1) && IntVal($value1["SORT"]) == $i) { $arTabs[] = array_merge($value1, array("CUSTOM" => "Y")); unset($arCustomTabs[$key1]); } } $arTabs[] = $value; $i++; } foreach ($arCustomTabs as $value1) $arTabs[] = array_merge($value1, array("CUSTOM" => "Y")); if(isset($_REQUEST[$this->name."_active_tab"])) $this->selectedTab = $_REQUEST[$this->name."_active_tab"]; else $this->selectedTab = $arTabs[0]["DIV"]; $this->tabs = $arTabs; } }