Grid/GridConfig.php
public function getFieldByName($name)
    {
        foreach ($this->fieldList as $field) {
            if ($field->getFieldName() === $name) {
                return $field;
            }
        }

        return null;
    }
public function getFieldByName($name)
    {
        foreach ($this->fieldList as $field) {
            if ($field->getFieldName() === $name) {
                return $field;
            }
        }

        return null;
    }
public function getFieldByName ( $ name ) { foreach ( $ this -> fieldList as $ field ) { if ( $ field -> getFieldName ( ) === $ name ) { return $ field ; } } return null ; }
returns the field corresponding to the name

@param string $name

@return Field|null $field
returns the field corresponding to the name