public function refreshSections()
    {
        if ($this->id === null) {
            return [];
        }

        $this->fields['IBLOCK_SECTION'] = [];
        $dbSections = static::$bxObject->getElementGroups($this->id, true);
        while ($section = $dbSections->Fetch()) {
            $this->fields['IBLOCK_SECTION'][] = $section;
        }

        $this->sectionsAreFetched = true;

        return $this->fields['IBLOCK_SECTION'];
    }
public function refreshSections()
    {
        if ($this->id === null) {
            return [];
        }

        $this->fields['IBLOCK_SECTION'] = [];
        $dbSections = static::$bxObject->getElementGroups($this->id, true);
        while ($section = $dbSections->Fetch()) {
            $this->fields['IBLOCK_SECTION'][] = $section;
        }

        $this->sectionsAreFetched = true;

        return $this->fields['IBLOCK_SECTION'];
    }
public function refreshSections ( ) { if ( $ this -> id === null ) { return [ ] ; } $ this -> fields [ 'IBLOCK_SECTION' ] = [ ] ; $ dbSections = static :: $ bxObject -> getElementGroups ( $ this -> id , true ) ; while ( $ section = $ dbSections -> Fetch ( ) ) { $ this -> fields [ 'IBLOCK_SECTION' ] [ ] = $ section ; } $ this -> sectionsAreFetched = true ; return $ this -> fields [ 'IBLOCK_SECTION' ] ; }
Refresh element's sections and save them to a class field.

@return array
Refresh element s sections and save them to a class field .