src/Page/PageSettingsRepository.php
public function getSettingByName(string $name): FieldTypeInterface
    {
        return $this->getSettings()->collapse()->first(function ($setting) use ($name) {
            /** @var FieldTypeInterface $setting */
            return $name === $setting->getName();
        });
    }
public function getSettingByName(string $name): FieldTypeInterface
    {
        return $this->getSettings()->collapse()->first(function ($setting) use ($name) {
            /** @var FieldTypeInterface $setting */
            return $name === $setting->getName();
        });
    }
public function getSettingByName ( string $ name ) : FieldTypeInterface { return $ this -> getSettings ( ) -> collapse ( ) -> first ( function ( $ setting ) use ( $ name ) { /** @var FieldTypeInterface $setting */ return $ name === $ setting -> getName ( ) ; } ) ; }
Return the setting instance based on its name.

@param string $name

@return FieldTypeInterface
Return the setting instance based on its name .