NumericNodeDefinition::max()

NumericNodeDefinition max(mixed $max) Ensures that the value is smaller than the given reference. Parameters mixed $max Return Value NumericNodeDefinition Exceptions InvalidArgumentException when the constraint is inconsistent

NumericNodeDefinition::cannotBeEmpty()

NodeDefinition|$this cannotBeEmpty() Denies the node value being empty. Return Value NodeDefinition|$this

NumericNodeDefinition

class NumericNodeDefinition extends ScalarNodeDefinition Abstract class that contains common code of integer and float node definitions. Methods __construct(string $name, NodeParentInterface $parent = null) Constructor. from NodeDefinition NodeDefinition|$this setParent(NodeParentInterface $parent) Sets the parent node. from NodeDefinition NodeDefinition|$this info(string $info) Sets info message. from NodeDefinition NodeDefinition|$this example(string|array $example) Sets ex

NumericNode

class NumericNode extends ScalarNode This node represents a numeric value in the config tree. Methods __construct(string $name, NodeInterface $parent = null, $min = null, $max = null) Constructor. setAttribute($key, $value) from BaseNode getAttribute($key, $default = null) from BaseNode hasAttribute($key) from BaseNode getAttributes() from BaseNode setAttributes(array $attributes) from BaseNode removeAttribute($key) from BaseNode setInfo(string $info) S

NumberType::getBlockPrefix()

string getBlockPrefix() Returns the prefix of the template block name for this type. The block prefix defaults to the underscored short class name with the "Type" suffix removed (e.g. "UserProfileType" => "user_profile"). Return Value string The prefix of the template block name

NumberType::configureOptions()

configureOptions(OptionsResolver $resolver) Configures the options for this type. Parameters OptionsResolver $resolver The resolver for the options

NumberType::buildForm()

buildForm(FormBuilderInterface $builder, array $options) Builds the form. This method is called for each type in the hierarchy starting from the top most type. Type extensions can further modify the form. Parameters FormBuilderInterface $builder The form builder array $options The options

NumberType

class NumberType extends AbstractType Methods buildForm(FormBuilderInterface $builder, array $options) Builds the form. buildView(FormView $view, FormInterface $form, array $options) Builds the form view. from AbstractType finishView(FormView $view, FormInterface $form, array $options) Finishes the form view. from AbstractType configureOptions(OptionsResolver $resolver) Configures the options for this type. string getBlockPrefix() Returns the prefix of the template block

NumberToLocalizedStringTransformer::transform()

mixed transform(mixed $value) Transforms a number type into localized number. Parameters mixed $value The value in the original representation Return Value mixed The value in the transformed representation Exceptions TransformationFailedException If the given value is not numeric or if the value can not be transformed.

NumberToLocalizedStringTransformer::reverseTransform()

mixed reverseTransform(mixed $value) Transforms a localized number into an integer or float. Parameters mixed $value The value in the transformed representation Return Value mixed The value in the original representation Exceptions TransformationFailedException If the given value is not a string or if the value can not be transformed.