src/Accordion.php
public function getSectionIdx($section)
    {
        $idx = -1;
        foreach ($this->sections as $key => $accordion_section) {
            if ($accordion_section->name === $section->name) {
                $idx = $key;
                break;
            }
        }

        return $idx;
    }
public function getSectionIdx($section)
    {
        $idx = -1;
        foreach ($this->sections as $key => $accordion_section) {
            if ($accordion_section->name === $section->name) {
                $idx = $key;
                break;
            }
        }

        return $idx;
    }
public function getSectionIdx ( $ section ) { $ idx = - 1 ; foreach ( $ this -> sections as $ key => $ accordion_section ) { if ( $ accordion_section -> name === $ section -> name ) { $ idx = $ key ; break ; } } return $ idx ; }
Return the index of an accordion section in collection.

@param AccordionSection $section

@return int
Return the index of an accordion section in collection .