public function initialize()
    {
        $this->initializeElements();

        $tabs = $this->getTabs();

        foreach ($tabs as $tab) {
            if (method_exists($tab->getContent(), 'getElements')) {
                $elements = $tab->getContent()->getElements();
                foreach ($elements as $element) {
                    if ($element instanceof self) {
                        foreach ($element->getTabs() as $subTab) {
                            if ($subTab->getName() == session('sleeping_owl_tab_id')) {
                                $tab->setActive(true);
                                $subTab->setActive(true);
                            }
                        }
                    }
                }
            }

            if ($tab->getName() == session('sleeping_owl_tab_id')) {
                $tab->setActive(true);
            }
        }

        $activeTabs = $this->getTabs()->filter(function (TabInterface $tab) {
            return $tab->isActive();
        })->count();

        if ($activeTabs === 0 && $firstTab = $this->getTabs()->first()) {
            $firstTab->setActive(true);
        }
    }
public function initialize()
    {
        $this->initializeElements();

        $tabs = $this->getTabs();

        foreach ($tabs as $tab) {
            if (method_exists($tab->getContent(), 'getElements')) {
                $elements = $tab->getContent()->getElements();
                foreach ($elements as $element) {
                    if ($element instanceof self) {
                        foreach ($element->getTabs() as $subTab) {
                            if ($subTab->getName() == session('sleeping_owl_tab_id')) {
                                $tab->setActive(true);
                                $subTab->setActive(true);
                            }
                        }
                    }
                }
            }

            if ($tab->getName() == session('sleeping_owl_tab_id')) {
                $tab->setActive(true);
            }
        }

        $activeTabs = $this->getTabs()->filter(function (TabInterface $tab) {
            return $tab->isActive();
        })->count();

        if ($activeTabs === 0 && $firstTab = $this->getTabs()->first()) {
            $firstTab->setActive(true);
        }
    }
public function initialize ( ) { $ this -> initializeElements ( ) ; $ tabs = $ this -> getTabs ( ) ; foreach ( $ tabs as $ tab ) { if ( method_exists ( $ tab -> getContent ( ) , 'getElements' ) ) { $ elements = $ tab -> getContent ( ) -> getElements ( ) ; foreach ( $ elements as $ element ) { if ( $ element instanceof self ) { foreach ( $ element -> getTabs ( ) as $ subTab ) { if ( $ subTab -> getName ( ) == session ( 'sleeping_owl_tab_id' ) ) { $ tab -> setActive ( true ) ; $ subTab -> setActive ( true ) ; } } } } } if ( $ tab -> getName ( ) == session ( 'sleeping_owl_tab_id' ) ) { $ tab -> setActive ( true ) ; } } $ activeTabs = $ this -> getTabs ( ) -> filter ( function ( TabInterface $ tab ) { return $ tab -> isActive ( ) ; } ) -> count ( ) ; if ( $ activeTabs === 0 && $ firstTab = $ this -> getTabs ( ) -> first ( ) ) { $ firstTab -> setActive ( true ) ; } }
Initialize tabbed interface.
Initialize tabbed interface .