src/Tasks/PopulateThemeSampleDataTask.php
protected function getContactFormExists()
    {
        $exists = false;
        foreach (UserDefinedForm::get()->column('ID') as $formId) {
            $count = Versioned::get_all_versions(UserDefinedForm::class, $formId)
                ->filter('URLSegment', 'contact')
                ->count();

            if ($count >= 1) {
                $exists = true;
                break;
            }
        }
        return $exists;
    }
protected function getContactFormExists()
    {
        $exists = false;
        foreach (UserDefinedForm::get()->column('ID') as $formId) {
            $count = Versioned::get_all_versions(UserDefinedForm::class, $formId)
                ->filter('URLSegment', 'contact')
                ->count();

            if ($count >= 1) {
                $exists = true;
                break;
            }
        }
        return $exists;
    }
protected function getContactFormExists ( ) { $ exists = false ; foreach ( UserDefinedForm :: get ( ) -> column ( 'ID' ) as $ formId ) { $ count = Versioned :: get_all_versions ( UserDefinedForm :: class , $ formId ) -> filter ( 'URLSegment' , 'contact' ) -> count ( ) ; if ( $ count >= 1 ) { $ exists = true ; break ; } } return $ exists ; }
Determine whether a "contact us" userform exists yet

@return bool
Determine whether a contact us userform exists yet