MoneyToLocalizedStringTransformer::reverseTransform()

mixed reverseTransform(mixed $value) Transforms a localized money string into a normalized format. 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.

MoneyToLocalizedStringTransformer

class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransformer Transforms between a normalized format and a localized money string. Constants ROUND_CEILING Rounds a number towards positive infinity. Rounds 1.4 to 2 and -1.4 to -1. ROUND_FLOOR Rounds a number towards negative infinity. Rounds 1.4 to 1 and -1.4 to -2. ROUND_UP Rounds a number away from zero. Rounds 1.4 to 2 and -1.4 to -2. ROUND_DOWN Rounds a number towards zero. Rounds 1.4 to 1 and -1.4 to -1. ROU

MoFileLoader

class MoFileLoader extends FileLoader Constants MO_LITTLE_ENDIAN_MAGIC Magic used for validating the format of a MO file as well as detecting if the machine used to create that file was little endian. MO_BIG_ENDIAN_MAGIC Magic used for validating the format of a MO file as well as detecting if the machine used to create that file was big endian. MO_HEADER_SIZE The size of the header of a MO file in bytes. Methods MessageCatalogue load(mixed $resource, string $locale, string $dom

MoFileDumper

class MoFileDumper extends FileDumper MoFileDumper generates a gettext formatted string representation of a message catalogue. Methods setRelativePathTemplate(string $relativePathTemplate) Sets the template for the relative paths to files. from FileDumper setBackup(bool $backup) Sets backup flag. from FileDumper dump(MessageCatalogue $messages, array $options = array()) Dumps the message catalogue. from FileDumper string formatCatalogue(MessageCatalogue $messages, string $dom

ModelType::setDefaultOptions()

setDefaultOptions(OptionsResolverInterface $resolver) Sets the default options for this type. Parameters OptionsResolverInterface $resolver The resolver for the options.

ModelType::getParent()

string|null|FormTypeInterface getParent() Returns the name of the parent type. You can also return a type instance from this method, although doing so is discouraged because it leads to a performance penalty. The support for returning type instances may be dropped from future releases. Return Value string|null|FormTypeInterface The name of the parent type if any, null otherwise.

ModelType::getName()

string getName() Returns the name of this type. Return Value string The name of this type

ModelType::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

ModelType

class ModelType extends AbstractType ModelType class. 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 setDefaultOptions(OptionsResolverInterface $resolver) Sets the default options for this type. string|null|FormTypeInterface getPa

ModelChoiceList::getValuesForChoices()

array getValuesForChoices(array $models) Returns the values corresponding to the given choices. The values must be strings. The values must be returned with the same keys and in the same order as the corresponding choices in the given array. Parameters array $models Return Value array An array of choice values with ascending, 0-based numeric keys