code/SiteConfig.php
public function requireDefaultRecords()
    {
        parent::requireDefaultRecords();

        $config = DataObject::get_one(SiteConfig::class);

        if (!$config) {
            self::make_site_config();

            DB::alteration_message("Added default site config", "created");
        }
    }
public function requireDefaultRecords()
    {
        parent::requireDefaultRecords();

        $config = DataObject::get_one(SiteConfig::class);

        if (!$config) {
            self::make_site_config();

            DB::alteration_message("Added default site config", "created");
        }
    }
public function requireDefaultRecords ( ) { parent :: requireDefaultRecords ( ) ; $ config = DataObject :: get_one ( SiteConfig :: class ) ; if ( ! $ config ) { self :: make_site_config ( ) ; DB :: alteration_message ( "Added default site config" , "created" ) ; } }
Setup a default SiteConfig record if none exists.
Setup a default SiteConfig record if none exists .