code/EditableSpamProtectionField.php
protected function getCandidateFields()
    {

        // Get list of all configured classes available for spam detection
        $types = $this->config()->get('check_fields');
        $typesInherit = array();
        foreach ($types as $type) {
            $subTypes = ClassInfo::subclassesFor($type);
            $typesInherit = array_merge($typesInherit, $subTypes);
        }

        // Get all candidates of the above types
        return $this
            ->Parent()
            ->Fields()
            ->filter('ClassName', $typesInherit)
            ->exclude('Title', ''); // Ignore this field and those without titles
    }
protected function getCandidateFields()
    {

        // Get list of all configured classes available for spam detection
        $types = $this->config()->get('check_fields');
        $typesInherit = array();
        foreach ($types as $type) {
            $subTypes = ClassInfo::subclassesFor($type);
            $typesInherit = array_merge($typesInherit, $subTypes);
        }

        // Get all candidates of the above types
        return $this
            ->Parent()
            ->Fields()
            ->filter('ClassName', $typesInherit)
            ->exclude('Title', ''); // Ignore this field and those without titles
    }
protected function getCandidateFields ( ) { // Get list of all configured classes available for spam detection $ types = $ this -> config ( ) -> get ( 'check_fields' ) ; $ typesInherit = array ( ) ; foreach ( $ types as $ type ) { $ subTypes = ClassInfo :: subclassesFor ( $ type ) ; $ typesInherit = array_merge ( $ typesInherit , $ subTypes ) ; } // Get all candidates of the above types return $ this -> Parent ( ) -> Fields ( ) -> filter ( 'ClassName' , $ typesInherit ) -> exclude ( 'Title' , '' ) ; // Ignore this field and those without titles }
Gets the list of all candidate spam detectable fields on this field's form

@return DataList
Gets the list of all candidate spam detectable fields on this field s form