src/Page/PageSettingsRepository.php
public function getSectionByName(string $name): SectionInterface
    {
        return $this->getSections()->first(function ($section) use ($name) {
            /** @var SectionInterface $section */
            return $name === $section->getId();
        });
    }
public function getSectionByName(string $name): SectionInterface
    {
        return $this->getSections()->first(function ($section) use ($name) {
            /** @var SectionInterface $section */
            return $name === $section->getId();
        });
    }
public function getSectionByName ( string $ name ) : SectionInterface { return $ this -> getSections ( ) -> first ( function ( $ section ) use ( $ name ) { /** @var SectionInterface $section */ return $ name === $ section -> getId ( ) ; } ) ; }
Return the section instance based on its name.

@param string $name

@return SectionInterface
Return the section instance based on its name .