Add new tab

@param   string $tabId
@param   array|Varien_Object $tab
@return  Mage_Adminhtml_Block_Widget_Tabs
556374
public function addTab($tabId, $tab)
    {
        parent::addTab($tabId, $tab);

        if ($this->_tabs[$tabId] instanceof Mage_Core_Block_Abstract && $this->_tabs[$tabId]->getParentBlock() === null) {
            $this->append($this->_tabs[$tabId]);
        }

        return $this;
    }
746975
public function add_admin_page( $tab ) {
		if ( 'github_updater_install_plugin' === $tab ) {
			$this->install( 'plugin' );
			$this->create_form( 'plugin' );
		}
		if ( 'github_updater_install_theme' === $tab ) {
			$this->install( 'theme' );
			$this->create_form( 'theme' );
		}
	}
49247
public function appendTab($str=null, $tabNum=1) {

        $tab = "";
        for ( $i = 0; $i < $tabNum; $i++ ) {
            $tab .= "\t";
        }
        $this->appendLine($tab.$str);

    }
1105072
public void add(E tabContent, String tabName) {

        tabContent.addStyleName(I_CmsLayoutBundle.INSTANCE.generalCss().cornerAll());
        m_tabPanel.add(tabContent, CmsDomUtil.stripHtml(tabName));

        Element tabRootEl = m_tabPanel.getElement();
        // set an additional css class for the parent element of the .gwt-TabLayoutPanelTabs element
        List<Element> tabDivs = CmsDomUtil.getElementsByClass(
            I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cmsTabLayoutPanelTab(),
            CmsDomUtil.Tag.div,
            tabRootEl);

        Iterator<Element> it = tabDivs.iterator();
        boolean first = true;
        while (it.hasNext()) {

            Element e = it.next();
            e.removeClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerLeft());
            e.removeClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerRight());
            if (first) {
                e.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerLeft());
                first = false;
            }
            if (!it.hasNext()) {
                e.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerRight());
            }
        }
        m_tabPanel.checkTabOverflow();
    }
750449
def insertTab(self, index, tab):
        
        if not isinstance(tab, XViewPanelItem):
            tab = XViewPanelItem(tab, self)
            tab.setFixedHeight(self.height())

        # remove it from the layout first
        self.layout().insertWidget(index, tab)
        self.setCurrentIndex(index)
        return tab
1287472
public function addTabs($i = 1)
    {
        Core\Config::setHTMLInstance($this);
        Core\Config::set('tabs', (Core\Config::get('tabs') + $i));

        return $this;
    }
1302197
public function addTab(string $label, string $content, bool $active = false, bool $disabled = false)
    {
        $this->items[] = [
            'label'    => $label, 
            'content'  => $content, 
            'active'   => $active, 
            'disabled' => $disabled
        ];
        return $this;
    }
764561
function setTabId (sections) {

    sections.forEach(function (section, sectionIndex) {

        if (!Array.isArray(section)) {
            return;
        }

        section.forEach(function (tab, tabIndex) {

            // Replace white space from tab.label with "-", make it lowercase and add the index number at the end.
            // sectionIndex and tabIndex number are added at the end to make the tabID unique in case when more then one tab have the same label (title)
            tab.tabId = (tab.label).replace(/\s+/g, '-').toLowerCase() + '-' + sectionIndex + '-' + tabIndex;

        });

    });

}
1335450
public function add($menuId)
    {
        $this->loadModel('Menu.Menus');
        $this->loadModel('Content.Contents');
        $menu = $this->Menus->get($menuId);
        $link = $this->Menus->MenuLinks->newEntity();
        $link->set([
            'activation' => 'auto',
            'status' => 1,
            'menu_id' => $menuId
        ]);
        $this->Menus->MenuLinks->addBehavior('Tree', [
            'scope' => ['menu_id' => $menu->id]
        ]);

        if ($this->request->data()) {
            $link = $this->Menus->MenuLinks->patchEntity($link, $this->request->data, [
                'fieldList' => [
                    'parent_id',
                    'title',
                    'url',
                    'description',
                    'target',
                    'expanded',
                    'active',
                    'activation',
                    'status'
                ]
            ]);

            if ($this->Menus->MenuLinks->save($link)) {
                $this->Menus->MenuLinks->recover();
                $this->Flash->success(__d('menu', 'Link successfully created!'));

                if (!empty($this->request->data['action_add'])) {
                    $this->redirect(['plugin' => 'Menu', 'controller' => 'links', 'action' => 'add', $menuId]);
                } elseif (!empty($this->request->data['action_menu'])) {
                    $this->redirect(['plugin' => 'Menu', 'controller' => 'links', 'action' => 'menu', $menuId]);
                }
            } else {
                $this->Flash->danger(__d('menu', 'Link could not be saved, please check your information'));
            }
        }

        $contentLinks = [];
        $contents = $this->Contents
            ->find()
            ->select(['id', 'slug', 'content_type_slug', 'title'])
            ->all();
        foreach ($contents as $content) {
            $contentLinks[stripLanguagePrefix($content->get('url'))] = __d('menu', '{0} [{1}]', [
                $content->title,
                $content->content_type_slug
            ]);
        }

        $parentsTree = $this->Menus->MenuLinks
            ->find('treeList', ['spacer' => '--'])
            ->map(function ($link) {
                if (strpos($link, '-') !== false) {
                    $link = str_replace_last('-', '- ', $link);
                }

                return $link;
            });

        $this->title(__d('menu', 'Create New Link'));
        $this->set(compact('menu', 'link', 'contentLinks', 'parentsTree'));
        $this->Breadcrumb
            ->push('/admin/menu/manage')
            ->push(__d('menu', 'Editing menu "{0}"', $menu->title), ['plugin' => 'Menu', 'controller' => 'manage', 'action' => 'edit', $menuId])
            ->push(__d('menu', 'Links'), ['plugin' => 'Menu', 'controller' => 'links', 'action' => 'menu', $menuId])
            ->push(__d('menu', 'Add new link'), '#');
    }
1178343
public function setTabIndex( $tabIndex ) {
		$tabIndex = preg_match( '/^-?\d+$/', $tabIndex ) ? (int)$tabIndex : null;

		if ( $this->tabIndex !== $tabIndex ) {
			$this->tabIndex = $tabIndex;
			$this->updateTabIndex();
		}

		return $this;
	}
1329350
public function build($args)
    {
        $data = [];

        foreach ($this->panels as $panel) {
            $args = Cuztom::merge($panel, [
                'parent'   => $this,
                'metaBox'  => $this->metaBox,
                'metaType' => $this->metaType,
                'object'   => $this->object,
                'tabsType' => $this->type,
            ]);

            $tab = new Tab($args, $this->value);

            $data[$tab->id] = $tab;
        }

        return $data;
    }
1197946
def add_tab(self, tab, title='', icon=None):
        
        if icon:
            tab._icon = icon
        if not hasattr(tab, 'clones'):
            tab.clones = []
        if not hasattr(tab, 'original'):
            tab.original = None
        if icon:
            self.main_tab_widget.addTab(tab, icon, title)
        else:
            self.main_tab_widget.addTab(tab, title)
        self.main_tab_widget.setCurrentIndex(
            self.main_tab_widget.indexOf(tab))
        self.main_tab_widget.show()
        tab._uuid = self._uuid
        try:
            scroll_bar = tab.horizontalScrollBar()
        except AttributeError:
            # not a QPlainTextEdit class
            pass
        else:
            scroll_bar.setValue(0)
        tab.setFocus()
        tab._original_tab_widget = self
        self._tabs.append(tab)
        self._on_focus_changed(None, tab)
153361
function(tab) {
        var that = this;
        if(typeof tab === 'string') {
            that.url = tab;
        } else if($.isPlainObject(tab)) {
            $.extend(that, tab);
        }
        if(!that.id) {
            that.id = $.zui.uuid();
        }
        if(!that.type) {
            if(that.iframe) {
                that.type = 'iframe';
                that.url = that.url || that.iframe;
            } else if(that.ajax) {
                that.type = 'ajax';
                that.url = that.url || ($.isPlainObject(that.ajax) ? that.ajax.url : that.ajax);
            } else if(that.url) {
                that.type = tab.ajax ? 'ajax' : 'iframe';
            } else {
                that.type = 'custom';
            }
        }
        that.createTime = new Date().getTime();
        that.openTime = 0;
        that.onCreate && that.onCreate.call(that);
    }
243042
public function addTab($name, $callback = null)
    {
        $c = parent::addTab($name, $callback);

        return $c->add([$this->formLayout, 'form' => $this->form]);
    }
619998
public WTab addTab(final WComponent content, final String tabName, final TabMode mode, final char accessKey) {
		return addTab(new WTab(content, tabName, mode, accessKey));
	}
879290
public function createTabsMenu(
        ManialinkInterface $manialink,
        Container $tabsFrame,
        ParentItem $rootItem,
        $actionCallback,
        $openId
    ) {

        foreach ($rootItem->getChilds() as $item) {
            if ($item->isVisibleFor($manialink->getUserGroup())) {

                $action = $this->actionFactory->createManialinkAction(
                    $manialink,
                    $actionCallback,
                    ['item' => $item, 'ml' => $manialink]
                );

                $tabItem = new MenuTabItem($item->getLabelId(), $action);
                $tabItem->setSize(24, 6);

                if ($item->getId() == $openId) {
                    $tabItem->setActive(true);
                }

                $tabsFrame->addChild($tabItem);
            }
        }

        $tabsFrame->setX(-1 * $tabsFrame->getWidth() / 2);

        return $tabsFrame;
    }
184450
public function nodeAdminListAction(Request $request, $tab, $page)
    {
        $pageId = 'ucms_contrib.content_admin.' . $tab;

        return $this->renderPage($pageId, $request, [
            'base_query' => $this->getTypeHandler()->getAdminPageBaseQuery($tab, $page),
        ]);
    }