protected function getPropertyField(\Asgard\Entity\Entity $entity, $name, \Asgard\Entity\Property $property, $locale=null) {
		$field = $this->getentityFieldSolver()->solve($property);

		if($field instanceof \Asgard\Form\DynamicGroup) {
			$field->setCallback(function() use($entity, $name, $property, $locale) {
				$field = $this->getentityFieldSolver()->doSolve($property);
				$options = $this->getEntityFieldOptions($property);
				$field->setOptions($options);
				return $field;
			});
		}
		elseif($field instanceof \Asgard\Form\Field) {
			$options = $this->getEntityFieldOptions($property);
			if(isset($options['hidden']) && $options['hidden'])
				$options['default'] = '';
			else
				$options['default'] = $this->getDefaultValue($entity, $name, $property, $locale);
			$field->setOptions($options);
		}

		return $field;
	}
protected function getPropertyField(\Asgard\Entity\Entity $entity, $name, \Asgard\Entity\Property $property, $locale=null) {
		$field = $this->getentityFieldSolver()->solve($property);

		if($field instanceof \Asgard\Form\DynamicGroup) {
			$field->setCallback(function() use($entity, $name, $property, $locale) {
				$field = $this->getentityFieldSolver()->doSolve($property);
				$options = $this->getEntityFieldOptions($property);
				$field->setOptions($options);
				return $field;
			});
		}
		elseif($field instanceof \Asgard\Form\Field) {
			$options = $this->getEntityFieldOptions($property);
			if(isset($options['hidden']) && $options['hidden'])
				$options['default'] = '';
			else
				$options['default'] = $this->getDefaultValue($entity, $name, $property, $locale);
			$field->setOptions($options);
		}

		return $field;
	}
protected function getPropertyField ( \ Asgard \ Entity \ Entity $ entity , $ name , \ Asgard \ Entity \ Property $ property , $ locale = null ) { $ field = $ this -> getentityFieldSolver ( ) -> solve ( $ property ) ; if ( $ field instanceof \ Asgard \ Form \ DynamicGroup ) { $ field -> setCallback ( function ( ) use ( $ entity , $ name , $ property , $ locale ) { $ field = $ this -> getentityFieldSolver ( ) -> doSolve ( $ property ) ; $ options = $ this -> getEntityFieldOptions ( $ property ) ; $ field -> setOptions ( $ options ) ; return $ field ; } ) ; } elseif ( $ field instanceof \ Asgard \ Form \ Field ) { $ options = $ this -> getEntityFieldOptions ( $ property ) ; if ( isset ( $ options [ 'hidden' ] ) && $ options [ 'hidden' ] ) $ options [ 'default' ] = '' ; else $ options [ 'default' ] = $ this -> getDefaultValue ( $ entity , $ name , $ property , $ locale ) ; $ field -> setOptions ( $ options ) ; } return $ field ; }
Get the field for a property.
@param  \Asgard\Entity\Entity   $entity
@param  string                  $name
@param  \Asgard\Entity\Property $property
@param  string                  $locale
@return \Asgard\FormInterface\Field
Get the field for a property .