Get single field instance from form object

@param $name
@return FormField
481212
public function getField($name)
    {
        if ($this->has($name)) {
            return $this->fields[$name];
        }

        throw new \InvalidArgumentException(
            'Field with name ['. $name .'] does not exist in class '.get_class($this)
        );
    }
1254701
public function getFieldsByName($name)
    {
        $result = [];

        foreach ($this->fields as $field) {
            if ($field->getName() == $name) {
                $result[] = $field;
            }
        }

        return $result;
    }
520005
public function getHasManyField($name)
    {
        $field = $this->getField($name);

        return $field instanceof HasManyField ? $field : null;
    }
1280831
protected function getForm($name = null, $option = null){
		if (!$name) {
			$name = $this->getName();
		}
		$frmCls = $this->getFormClass($option);
		$form = $this->getServiceLocator()->get('FormElementManager')->get($frmCls);
		return $form;
	}
1051490
protected function getField($name)
    {
        if (array_key_exists($name, $this->fields)) {
            return $this->fields[$name];
        } else {
            throw new FormatterException('Field not exists');
        }
    }
193315
public function removeFieldByName($name)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getName() == $name) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
57618
public function getControl($name) {
		
		if (substr($name, -2) == '[]') {
			$name = substr($name, 0, -2);
		}
		
		if ($this->controlExists($name)) {
			return $this->controls[$name];
		} else {
			$log = Logger::getInstance();
			$log->addError('Field control “' . $name . '” has not been defined in Form object'); 
			return NULL;
		}
		
	}
325428
public function getFormName($name)
    {
        return isset($this->forms[$name]['name']) ? $this->forms[$name]['name'] : null;
    }
53951
public function getField($name)
	{
		$component = $this->getComponent($name);

		if($component instanceof Field === false)
			throw new \UnexpectedValueException('The component with name "' . $name , '" is not of type Field but of type ' . get_class($component));

		return $component;
	}
76517
protected function createComponentForm(string $name): Form
    {
        $form = new Form($this, $name);
        $form->setTranslator($this->translator);
        $this->formContainer->getForm($form);

        $form->onSuccess[] = $this->eventContainer;
        return $form;
    }
434710
public function getDynamicField($name)
    {                              
        $fields = $this->getFieldsDef();
        
        if (!isset($fields[$name])) {
            if (isset($this->fields[$name]))
                return $this->fields[$name];
            return false;
        }  
            //throw new LogicException('Property "'.$name.'" does not exist.'); 
    
        switch($fields[$name]['type']){
        	//case FIELD_FORM: 
            //    return $this->getFormField($fields[$name]);
        	//	break;
        	case FIELD_LINK: 
        	case FIELD_MATERIAL: 
                return $this->getMaterialField($fields[$name]);
        		    break;
        	//case FIELD_HLINK: 
          //      return $this->getHlinkField($fields[$name]);
        	//	    break;
        	case FIELD_LINKSET: 
        	case FIELD_MATSET: 
                return $this->getLinksetField($fields[$name]);
        		    break;
        	case FIELD_LINKSET2: 
                return $this->getLinkset2Field($fields[$name]);
        		    break;					
        	default: 
                return $this->getPlainField($fields[$name]); 
        }
    }
428855
public function setName($name)
    {
        $this->name = $name;
        $this->setChecked($this->form->getFieldValue($this->name) == $this->getValue());
        return $this;
    }
147709
public static function get(string $name, string $key, string $field = null)
    {
        return static::getInstance($name)->get($key, $field);
    }
48926
protected function _getField($name)
    {
        return isset( $this->_response[$name] ) ? $this->_response[$name] : null;
    }
1125306
public function getField($name)
    {
        if ('pk' === $name) {
            $name = $this->getPrimaryKeyName();
        }

        $name = $this->getMappingName($name);

        if (isset($this->fields[$name])) {
            $field = $this->fields[$name];
            $field->cleanValue();

            return $field;
        }
    }
570603
protected function getFieldValue($name)
    {
        $field = $this->getField($name);

        if ($field->getSqlType()) {
            $platform = $this->getConnection()->getDatabasePlatform();

            $attributeValue = $this->getAttribute($field->getAttributeName());

            if ($name == $field->getAttributeName()) {
                return $field->convertToPHPValueSQL($attributeValue, $platform);
            }

            return $field->convertToPHPValue($attributeValue, $platform);
        }

        return $field->getValue();
    }
1134065
public function getField($name)
    {
        $namedField = null;
        $fields     = $this->getFields();
        foreach ($fields as $field) {
            if ($field->getName() == $name) {
                $namedField = $field;
                break;
            }
        }
        return $namedField;
    }