Fields can have action to, let's check if anyone of the responds to $funcname them

@param SS_List|array $fields
@param callable $funcName
@return FormField
775787
protected function checkFieldsForAction($fields, $funcName)
    {
        foreach ($fields as $field) {
            /** @skipUpgrade */
            if (ClassInfo::hasMethod($field, 'FieldList')) {
                if ($field = $this->checkFieldsForAction($field->FieldList(), $funcName)) {
                    return $field;
                }
            } elseif ($field->hasMethod($funcName) && $field->checkAccessAction($funcName)) {
                return $field;
            }
        }
        return null;
    }
188635
public function updateFormFields(FieldList $fields, $controller, $formName, $context)
    {
        $image = isset($context['Record']) ? $context['Record'] : null;
        if ($image && $image->appCategory() === 'image') {
            $fields->insertAfter(
                'Title',
                FocusPointField::create('FocusPoint', $image->fieldLabel('FocusPoint'), $image)
                    ->setReadonly($formName === 'fileSelectForm')
            );
        }
    }
1373104
public function convertDataObjectSet(SS_List $set, $fields = null)
    {
        $items = array();
        foreach ($set as $do) {
            if (!$do->canView()) {
                continue;
            }
            $items[] = $this->convertDataObjectToJSONObject($do, $fields);
        }

        $serobj = ArrayData::array_to_object(array(
            "totalSize" => (is_numeric($this->totalSize)) ? $this->totalSize : null,
            "items" => $items
        ));

        return Convert::array2json($serobj);
    }
484049
public function fields($fields)
    {
        if (is_array($fields) || $fields === null) {
            $this->fields = $fields;
        } else {
            $this->fields = func_get_args();
        }
        return $this;
    }
1137457
public function aggregate($functionName, $fieldName)
    {
        $field = new Field;
        $field->useRaw();
        $field->setRawSQL($functionName . '(' . $field->parseKeyword($fieldName). ')');
        $this->option->field = [
            $field
        ];
        return $this->select()->getScalar();
    }
1195722
public function parse($name, $fields)
    {
        list($action, $tableName) = $this->parseMigrationName($name);

        $this->action = $action;
        $this->tableName = $tableName;
        $this->fields = $fields;

        return $this;
    }
540699
public function fieldIsRequired($fieldName)
    {
        $required = false;

        $constraints = $this->getConstraints($fieldName);
        if ($constraints) {
            foreach ($constraints as $constraint) {
                if ($constraint instanceof Constraint_required) {
                    $required = true;
                    break;
                }
            }
        }

        return $required || parent::fieldIsRequired($fieldName);
    }
113602
public function fields($fields) {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $this->_fields = $fields;

        return $this;
    }
368299
public function hasField($fieldName)
    {
        $fields = array_filter($this->fields, function(Field $field) use ($fieldName) {
            return $field->name == $fieldName || $field->getNameWithAlias() == $fieldName;
        });

        if (count($fields) == 0) {
            return false;
        }

        return true;
    }
618820
private function buildListen($field, $funcName)
    {
        $strJs = '';
        $fieldId = $field->id;
        if (\in_array($field->attribs['type'], array('checkbox','radio'))) {
            foreach (\array_keys($field->props['options']) as $k) {
                // just capture click (not change) because IE 7 & below doesn't fire change until blur
                $strJs = '$("#'.$fieldId.'_'.$k.'").on("click", function(){ '
                    .'document.getElementById("'.$fieldId.'_'.$k.'").blur();'
                    .$funcName.'();'
                .'});';
            }
        } else {
            $event = 'change';
            if ($field->attribs['type'] == 'submit') {
                $event = 'click';
            } elseif ($field->attribs['type'] == 'text') {
                $event = 'keyup';
            }
            $strJs .= '$("#'.$fieldId.'").on("'.$event.'", '.$funcName.');';
        }
        return $strJs;
    }
113228
static public function CheckedFieldName( 
                            string $field_name,
                            bool $allow_subquery = true,
                            bool $allow_function = true
    ) : bool {	
	
        $ret = true;
        
        if ( ! strlen( trim( $field_name ) ) ) {
            return false;
        }
    
        /*
        echo 
            "\n CheckedFieldName( {$field_name} ," .
            ' allow_subquery = ' . ( $allow_subquery ? 'true' : 'false' ) . ',' .
            ' allow_function = ' . ( $allow_function ? 'true' : 'false' ) .
            "' ) "
        ;
        */
        
        if ( self::IsSubquerySQL( $field_name ) )  {
            $ret = $allow_subquery;
        } elseif ( self::IsFunctionSQL( $field_name ) )  {
            $ret = $allow_function;
        } else {
        
            $ret = ( self::ContainsSpace( $field_name ) == false );
            if ( ! $ret ) {
                // maybe an alias ?
                $field_name_pure = \rstoetter\cSQL\cSQL::RemoveAlias( $field_name );
                $ret = ( self::ContainsSpace( $field_name_pure ) == false );
            }
            
            if ( $ret ) {
                $ret = ( substr( $field_name, 0, 1 ) != '.' );
            }
            
            if ( $ret ) {
                $ret = ( substr( $field_name, -1, 1 ) != '.' );
            }            
        
        }
        
        // echo "\n CheckedFieldName( ) returns " . ( $ret ? 'true' : 'false' );
        
        return $ret;
	
	}
302842
public function validate($field, $value, callable $callback = null)
    {
        $key = $field;

        if (is_array($field)) {
            $key = key($field);
            $field = current($field);
        }

        if ($callback !== null) {
            $value = $callback($value);
        }

        while (!empty($this->stack)) {
            $item = array_shift($this->stack);

            if (null === $validator = $this->collection->get($item['name'])) {
                throw new RuntimeException('Unknown validator `' . $item['name'] . '`');
            }

            $arguments = $validator->getFormattedArgs($item['arguments']);

            if ($validator->validate($value, $arguments)) {
                continue;
            }

            $this->stack = [];
            $this->errors[$key] = $this->formatError($field, $validator, $validator, $arguments,
                $item['error'] ?? null);

            break;
        }

        return $value;
    }
854313
public function onceBasic($field = 'email', Request $request = null)
    {
        $request = $request ?: $this->getRequest();

        if (! $this->once($this->getBasicCredentials($request, $field))) {
            return $this->getBasicResponse();
        }
    }
278600
public function copyfrom($key,$func=NULL)
    {
        $var=is_array($key)?$key:Instance::get($key);
        if ($func)
            $var=call_user_func($func,$var);
        foreach ($var as $key=>$val)
            !isset($this->_properties['fields'][$key]) || $this->set($key, $val);

        return $this;
    }
207154
public static function extendFormFields($callback)
    {
        $calledClass = self::getCalledExtensionClass();
        Event::listen('backend.form.extendFields', function ($widget) use ($calledClass, $callback) {
            if (!is_a($widget->getController(), $calledClass)) {
                return;
            }
            call_user_func_array($callback, [$widget, $widget->model, $widget->getContext()]);
        });
    }
573458
function addDocSpecFunction( $functionName, $parameters )
    {
        $docSpec = array_pop( $this->PreStack );
        $this->DocSpecification[] = array ( 'docSpec' => $docSpec,
                                            'isFunction' => true,
                                            'functionName' => $functionName,
                                            'parameters' => $parameters );
        $this->PreStack[] = $docSpec;
    }
183959
public function callFunction($functionName, $parameters)
    {
        $parameters = is_array($parameters) ? $parameters : array();
        $response = call_user_func_array(array($this->getObject(), $functionName), $parameters);

        return $response;
    }